Answer the question
In order to leave comments, you need to log in
How to make a 301 redirect when moving to a new domain?
Hello! There are two domains servicelap.ru and servicelap.info, both domains belong to me. Transferred the entire site to .info, and deleted all files on .ru, leaving only htacsess. What rule should be written so that if people go from a search to the .ru domain, they are automatically redirected to .info. for example www.servicelap .ru /remont-dell/ to www.servicelap .info /remont-dell/
Domain with .ru in Yandex index 8000 pages.
Answer the question
In order to leave comments, you need to log in
Just replace one domain with another with full preservation of the subsequent request, and make a 301.
https://web-optimizator.com/301-redirekt-htaccess/ point 15.
RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(.*)$ http://site.ru/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^(www\.|)servicelap\.ru$
#если сайт с ввв и без
RewriteRule ^(.*)$ http://www.servicelap.info/$1 [L,R=301]
#То перенаправить на домен, скопировав весь урл
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question