Thursday 13 July 2017

Redirect old Blog to new website without Changing posts url

This script works well if you have recently changed the URL of your blog and of course, your traffic doesn’t know this.To let them know, you just install a redirection application.But when your blog's customer tries to open up one of your blog's posts, he redirected to homepage of your website. 



This script is not like that scripts.This script will redirect your blog http://nmk.com/POST_URL to another blog but which same post URL.Don't you think it’s great?

How to Install this Redirection Script on Blogger?

It’s very simple Just follow some easy as ABC steps and you will get working script!

Steps are following:-

  • Go to Blogger Dashboard > Template > Edit HTML
  • Now, search for '<head>' (you know how).
  • Next step- Just add this short JavaScript below '<head>' after customizing it.
<script type='text/javascript'>
 var blog = document.location.hostname.split(".");
if (blog[blog.length - 1] != "YOUR_BLOG_URL.com") {
  var ncr = "http://REDIRECT_BLOG_URL.com/ncr";
window.location.replace(ncr + document.location.pathname);    
 }
 </script>
  • Change Green highlighted words with your blog and blue highlighted URL which the blog URL which you want to redirect.Save your template and you're done.

No comments:

Post a Comment