Answer the question
In order to leave comments, you need to log in
How to make a redirect automatic on the full URL?
Hello.
The question is this:
I have domains xxx.ru and yyy.ru
xxx.ru - the main one and it has all the stuffing of the site, yyy.ru - auxiliary, in case of errors. So I want a complete link redirect.
What for? Because the links I have are very CNC and you can not even use the search on the site. I just entered the name in the URL and that's it.
So I want that if the visitor enters yyy.ru/marker.html, then he would get
to
xxx.ru/marker.html
/ is removed automatically. How can I make my urls active at both addresses?
I tried RedirectMatch - it didn’t work out for me, most likely - crooked hands.
Answer the question
In order to leave comments, you need to log in
If using the Apache mod_rewrite, then like this:
RewriteCond %{HTTP_HOST} yyy.ru
RewriteRule (.*) http://xxx.ru/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question