PREVENT BLOG REDIRECTION TO COUNTRY-SPECIFIC URL.

 On Kamis, 19 April 2012  

I recently came across a tutorial which talks about redirecting blogger blogs back to .com after Google started redirecting blog url to that country's URL.

If you have a blog, e.g yourblog.blogspot.com,the blog might be redirected to yourblog.blogspot.in for some countries.
In other countries,it might be .com.au , .com.uk , .tketc.

As a blog owner,it is necessary to redirect your blog back to .com.
To do this,all you have to do is add some little javascripts into your blogger template.

Go to Design >> Edit HTML.Backup your template in case something goes wrong.

Check the box next to
Expand Widget Template and search for </head> by pressing ctrl+f.

Now,add the following code just ABOVE </head> tag.

<script type="text/javascript">var blog = document.location.hostname;var slug = document.location.pathname;var ctld = blog.substr(blog.lastIndexOf("."));if (ctld != ".com") {var ncr = "http://" blog.substr(0, blog.indexOf("."));ncr = ".blogspot.com/ncr" slug;window.location.replace(ncr);}</script>

Preview your blog,& save the template.
Its as simple as that!!!
PREVENT BLOG REDIRECTION TO COUNTRY-SPECIFIC URL. 4.5 5 Unknown Kamis, 19 April 2012 I recently came across a tutorial which talks about redirecting blogger blogs back to .com after Google started redirecting blog url to that...


Tidak ada komentar:

Posting Komentar