Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirecting Old blog address to a new blog address permanently in blogger

Tags:

blogger

I'm having a blogger blog and it's custom domain expires in a week. So, I planned to create a new blog and redirect the custom domain to the new blog domain. Consider, my old domain is old-blog.blogspot.com and I wish to redirect all the links to the old blog to my new address new-blog.blogspot.com. So, was there any ways doing it?

As I googled, I read about doing that with blogger conditional statements and that should be done for every post. But, in my blog I've more than 200 posts. Any ways?

like image 660
Gowtham Avatar asked Apr 25 '13 14:04

Gowtham


1 Answers

You could try to use javascript.

Put the following code inside <head> tag in your template.

<script type='text/javascript'>
  var d='<data:blog.url/>';
  d=d.replace(/.*\/\/[^\/]*/, '');
  location.href = 'http://new-blog.blogspot.com'+d;
</script>

This will redirect user to the new domain and to the same post URL as in old domain.

like image 196
user850010 Avatar answered Oct 21 '22 17:10

user850010