how do i stop to my blog redirect to a country-specific URL?

Author Topic: how do i stop to my blog redirect to a country-specific URL?  (Read 2445 times)

Offline oliviasrodriguezTopic starter

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 6
  • Posts: 62
  • Karma: 2
  • Gender: Female
Many friends told me that you should stop your blog redirect to a country-specific url on your blog. What should i do now?


Offline Shikha Singh

  • Trade Count: (0)
  • Sr. Member
  • ****
  • Thank You 52
  • Posts: 323
  • Karma: 0
  • Gender: Female
  • solution to start online business
    • solution to start online business
Go to your blog inside the Blogger Dashboard and choose Template. Then click the “Edit HTML” button followed by “Proceed.” Next, copy-paste the following code into the template after the <head> tag.

<script type="text/javascript">
 
  // Written by Amit Agarwal
 
  /* Get the full URL of the current blogger page */
  var blog = document.location.href.toLowerCase();
 
  /* Do not redirect if the domain is .com already */
  if (!blog.match(/\.blogspot\.com/)) {
 
    /* Replace the country TLD with .com and ncr switch */
    blog = blog.replace(/\.blogspot\..*?\//, ".blogspot.com/ncr/");
 
    /* Redirect to the new .com URL in the current tab */
    window.location.replace(blog);
  }
 
  // Source: http://labnol.org/?p=21031
 
</script>

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
1934 Views
Last post 05-09-2010, 22:35:46
by Nicpoint45
3 Replies
1721 Views
Last post 10-04-2011, 00:43:45
by Hogward
0 Replies
1595 Views
Last post 09-05-2014, 06:41:21
by centralseo
0 Replies
1132 Views
Last post 03-05-2016, 22:11:38
by mindblowing
0 Replies
639 Views
Last post 04-23-2016, 04:58:00
by psyafter