Do redirect 301 for wordpress page

I have two domains, one server, the same files here and there. I want to redirect from one domain to another, but someth

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 badge
Add a comment  | 

1 Answer 1

Reset to default 0
RewriteEngine On

RewriteCond %{REQUEST_URI} (.) RewriteRule ^(.)$ http://new-domain.tld/$1 [L,R=301]

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744729896a4590404.html

相关推荐

  • Do redirect 301 for wordpress page

    I have two domains, one server, the same files here and there. I want to redirect from one domain to another, but someth

    1天前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信