Answer the question
In order to leave comments, you need to log in
How to correctly set up a synonym redirect to the site folder while saving the synonym URL?
Good day!
There is a main domain of the form xxx.ru
A synonym demo.xxx.ru has been added to it
How to configure .htaccess correctly so that when accessing demo.xxx.ru, the data is taken from xxx.ru/demo, but with the preservation of the URL demo.xxx.ru?
Sincerely, Me!
Answer the question
In order to leave comments, you need to log in
RewriteCond %{HTTP_HOST} ^(www|\.)demo\.site\.ru [NC]
# если хост демо или он же с ввв
RewriteRule ^(.*)$ http://site.ru/demo/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question