As we all know blogger doesn’t provide an option for 301 redirect on a page by page basis. The only option left with us is meta refresh redirect.
Say you want to redirect http://xyz.blogspot.com/2008/11/about.html to http://www.xyz.com/about/
Here is the code that you will need:
<b:if cond='data:blog.url == "http://xyz.blogspot.com/2008/11/about.html"'>
<meta content='0;url=http://www.xyz.com/about/' http-equiv='refresh'/>
</b:if>
Some points to note:
- You need to place this code just before the head section closure ie before </head> tag.
- Take note of spacing before and after equals to sign and also there should be two (==) and not one (=) equals to sign.
- content = 0 means. The browser will wait for 0 seconds before redirecting to another page.
Big thanks for you. But this is okay if i put them inside the code of single post not in blogger template code?
Exactly what I was looking for. Thanks!
TEMPLATE ERROR: Unterminated string literal in [data:blog.url == “http://www.forhuntersbyhunters.com/p/forhuntersbyhunters-custom-turkey-calls.html;] before 100
Working perfectly. Very helpful! 🙂
Awesome! Thanks for this fab bit of code it did the trick and saved the day!!
Effective and quick to implement. Thank you very much for sharing your knowledge!
Great, it has been very usefull to me! Thank you very much for your effort! Cheers!
Hi,
Thanks,
There is one problem taht is my page is redirect on my domain but my old blog page is not shown there.also when am open my new site then page cannot displayed
Thanks! This worked, although I briefly see the original page before it switches over to the other website I’m redirecting to.
I wish it was a function of Blogger by default.
Thanks for your help!
No doubt tht is post is good and very helpful but thr is a lag in switching. Can the small delay be erased?
Thanks a lot. I’ve tried this and it works quite well.
Beautiful, thanks