Answer the question
In order to leave comments, you need to log in
Two domains for one site. How to configure htaccess correctly?
I can't figure it out with htaccess.
There is a main domain, it does not need redirects.
There is an alias, and so, depending on whether there is anything in the REQUEST URI or not, redirect to the a or b directory, respectively.
Tried to do something like this
RewriteCond %{HTTP_HOST} ^(.*\.)?alias.domain$
RewriteRule ^(.+)/?$ /a/$1
RewriteRule ^.*/$ /b/ [L]
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