Answer the question
In order to leave comments, you need to log in
How to make a redirect from the internal pages of one domain to the internal pages of another?
Good afternoon.
Can you please tell me how to correctly write in the htaccess file so that the transition from the internal pages of one domain to the internal pages of another domain is carried out? For example:
site1.ru/o_nas.html on site2.ru/o_nas.html I register
it like this, it turns out:
Redirect 301 /o_nas.html www.site2.ru/o-nas.html
but then how to register correctly so that the transition from the site1 domain is carried out .ru to the internal page site2.ru/chai.html ? Since when adding such lines, everything stops working:
RewriteEngine On
RewriteCond %{HTTP_HOST} site1.ru
RewriteRule (.*) www.site2.ru/chai.html$1 [R=301,L]
If I do this:
Redirect 301 /site2.ru/chai.html
Redirect 301 /o_nas.html site2.ru/o-nas.html
then the transition to site2.ru/o-nas.html is not performed
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