Thursday, April 11, 2013

Redirect Blogspot.in To blogspot.com

Simply redirect blogspot.in To blogspot.com. ! As I do ..!

Earlier I was very curious about this, So you can also do this with your blog by simply adding this javascript code below mention..!


Step(1): You have to go to Blogger.com > Template > Edit HTML.

Step(2): Try to Find <head> tag.

Step(3):  Once you find <head> tag, Now Paste Below mention JavaScript code below <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>

or you can use this script..below

<script type='text/javascript'>
if ((window.location.href.toString().indexOf(&#39;.com/&#39;))==&#39;-1&#39;) {
window.location.href =
window.location.href.toString().replace(&#39;.blogspot.in/&#39;,&#39;.blogspot.com/ncr/&#39;);
}
</script>

Step(3): Now you have to save your template.

Now its All Done.. You blog will always appear as blogspot.com . And please don't forget to say thanks to me...!