You must configure the redirect poddomen.site.ru/some-paht/ to site.ru/some-paht/?region=poddomen .
But so that if there is a parameter on the way, for example - poddomen.site.ru/some-paht/?parameters=param1 , redirect to site.ru/some-paht/?parameters=param1®ion=poddomen .
That is, the path and parameters after the domain name are not known in advance, you just need to save the entire path and parameters, only add to them as additional. subdomain name parameter.