Answer the question
In order to leave comments, you need to log in
Regional subdomains via htaccess, how to do it via GET?
Good day to all.
On the site I'm trying to organize SEO subdomains by city. So that a person, after choosing a city, is redirected to city.domain.ru. Googled that in .htaccess it is necessary to register such a construction
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{REQUEST_URI} !index\.php
RewriteCond %{HTTP_HOST} ^(.+?)\.dst.negabarite.work\.ru$
RewriteRule .* /index.php?city=%1 [L]
Answer the question
In order to leave comments, you need to log in
We solved the issue a little differently by registering Alias on the hosting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question