Answer the question
In order to leave comments, you need to log in
Subdomain with htaccess, gorod.site.ru to site.ru/?cite=gorod?
Please tell me, I’m
trying to redirect from the subdomain to the main site using .htaccess
so that gorod.site.ru goes to site.ru/?city=gorod
I’m trying and it doesn’t work
RewriteCond %{HTTP_HOST} !^www\.%{SERVER_NAME}$
RewriteCond %{HTTP_HOST} ^(.+)\.%{SERVER_NAME}$
RewriteCond %{REQUEST_URI} !/%1/
#RewriteRule ^ https://%{SERVER_NAME}/?city=$1 [L,R=301]
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