Answer the question
In order to leave comments, you need to log in
Redirect for all subdomains to their folders?
Good afternoon!
It is necessary to set up a redirect without changing the url for all regional subdomains to folders located in the root directory of the main site with the same names (moscow.site.ru > site.ru/moscow), without writing their names in htaccess, but using some universal method .
The following code currently works:
RewriteCond %{HTTP_HOST} ^dzerzhinsk\.xn--80ajybdmjbd1a\.xn--p1ai$
RewriteCond %{REQUEST_URI} !/dzerzhinsk/
RewriteRule ^(.*)$ /dzerzhinsk/$1 [L]
and so for all subdomains, of which there are 157 pieces, I want to reduce htaccess every 100 times, is it possible to do this?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question