简体   繁体   中英

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.
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

Now I want to move back to the free domain with the .blogspot.com
new.com/anyurlpage to 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.
Will it work? Please help, thanks!

I would suggest using CloudFlare for addressing this problem.

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. To redirect all the traffic to the BlogSpot domain, use their inbuilt support for wildcards and variables. Like for example -

Detection URL - *yourcustomdomain.com/*

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

This will redirect all traffic from the custom domain to the BlogSpot URL while preserving the pathname

For more information, refer to - https://support.cloudflare.com/hc/en-us/articles/200172286

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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