I have two domains, one server, the same files here and there. I want to redirect from one domain to another, but something does not work. What I write in .htaccess appears on both, as one server, the same files here and there. But the host does not have such a function and I need to through .htaccess
RewriteCond %{HTTP_HOST} ^old.ch/$ [OR]
RewriteCond %{HTTP_HOST} ^/$
RewriteRule (.*)$ /$1 [R=301,L]
it's work 50/50 and doesnt work in the incognito
I have two domains, one server, the same files here and there. I want to redirect from one domain to another, but something does not work. What I write in .htaccess appears on both, as one server, the same files here and there. But the host does not have such a function and I need to through .htaccess
RewriteCond %{HTTP_HOST} ^old.ch/$ [OR]
RewriteCond %{HTTP_HOST} ^http://old.ch/$
RewriteRule (.*)$ https://new.ch/$1 [R=301,L]
it's work 50/50 and doesnt work in the incognito
Share Improve this question asked Feb 20, 2020 at 12:41 kaizerkaizer 51 bronze badge1 Answer
Reset to default 0RewriteEngine On
RewriteCond %{REQUEST_URI} (.) RewriteRule ^(.)$ http://new-domain.tld/$1 [L,R=301]
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744729896a4590404.html
评论列表(0条)