简体   繁体   English

使用相同的网址页面将流量重定向到其他域到博客域

[英]Redirect traffic to different domain with same url page to blogger domain

A Month ago I moved to a custom domain in blogger, but now I want to return my old free domain of Blogspot. 一个月前,我移至Blogger中的自定义域,但现在我想返回旧的Blogspot免费域。
In blogger when we set custom domain its redirect the traffic to the new domain without losing traffic. 在博客中,当我们设置自定义域时,它将流量重定向到新域而不会丢失流量。 example: old.blogspot.com/anyurlpage to: new.com/anyurlpage 例如:old.blogspot.com/anyurlpage到:new.com/anyurlpage

Now I want to move back to the free domain with the .blogspot.com 现在,我想使用.blogspot.com回到免费域
new.com/anyurlpage to old.blogspot.com/anyurlpage 从new.com/anyurlpage到old.blogspot.com/anyurlpage
How can i do the same without losing traffic? 我该如何做而又不会丢失流量?
If I understand correctly this should do the job: 如果我正确理解,这应该可以完成工作:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^OLDDOMAIN\.com$ [NC]
RewriteRule ^(.*)$ http://NEWDOMAIN.com [R=301,L]


I'll use web hosting to create a .Htaccess file, and paste these lines. 我将使用网络托管来创建.Htaccess文件,并粘贴这些行。
Will it work? 能行吗 Please help, thanks! 请帮忙,谢谢!

I would suggest using CloudFlare for addressing this problem. 我建议使用CloudFlare解决此问题。

After you have setup CloudFlare on the custom domain, go to the Page Rules section of their dashboard and set a forwarding URL Page Rule with 301 redirect. 在自定义域上设置CloudFlare之后,请转到其仪表板的“页面规则”部分,并设置具有301重定向的转发URL页面规则。 To redirect all the traffic to the BlogSpot domain, use their inbuilt support for wildcards and variables. 要将所有流量重定向到BlogSpot域,请使用其对通配符和变量的内置支持。 Like for example - 例如-

Detection URL - *yourcustomdomain.com/* 检测网址-* yourcustomdomain.com / *

Redirect URL - https://yourblogname.blogspot.com/$2 重定向URL-https://yourblogname.blogspot.com/$2

This will redirect all traffic from the custom domain to the BlogSpot URL while preserving the pathname 这会将所有流量从自定义域重定向到BlogSpot URL,同时保留路径名

For more information, refer to - https://support.cloudflare.com/hc/en-us/articles/200172286 有关更多信息,请参阅-https://support.cloudflare.com/hc/en-us/articles/200172286

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM