最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Do redirect 301 for wordpress page

programmeradmin1浏览0评论

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]

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论