How to Redirect Visitor from Blogger Blogspot to Wordpress
Wednesday, July 15, 2009
You have new wordpress blog but unfortunately your blogger account still exists, you may have a thought to remove it but i'd suggest you that you shouldn't because if you do, then that will affecting your blogger blog post in wordpress. So leave your blogger account and what you need for now is to lead your visitor to your new wordpress blog. I accidentally found this nice trick to redirect visitor from Blogger blogspot to wordpress and just have a thought to share with you all
1. Login to your Blogger account, Ensure you are using old blogspot but if you are using new custom layout then click on “Revert to Classic Template” option (Dasboard > Edit Layout > Edit HTML) to go back to old blogger account
2. Put the following code by CTRL + A and paste this code. Make sure you replace the red bold one into your new wordpress blog[html>
[head>
[script LANGUAGE="JavaScript">
[!--
window.location.replace("http://www.devilsworkshop.org/");
-->
[/script>
[noscript>
[meta http-equiv="Refresh" content="10; URL=http://www.devilsworkshop.org/"/>
[meta http-equiv="expires" content="10"/>
[meta name="Description" content="301 moved permanently"/>
[META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW"/>
[META NAME="GOOGLEBOT" CONTENT="NOINDEX, FOLLOW"/>
[/noscript>
[title>301 moved permanently[/title>
[/head>
[body>
[center>
[h1>Devils Workshop[/h1>
[p>has been moved to new address[/p>
[a href=" http://www.devilsworkshop.org"> [h1>http://www.devilsworkshop.org[/h1>[/a>
[p>Sorry for inconvenience... [/p>
[/center>
[/body>
[/html>
PS - You can also use Plugin but honestly i got an error when i attempt to install it. If you want the plugin, grab it here
3. We want all your blog post to redirect as well into wordpress blog, so we are going back to your new wordpress and edit index.php (Admin CP > Appearance > Editor) Put this code on the top and replace the bold one into your old blogspot blog.[?php
$oldBlogURL = "rb286.blogspot.com";
$ref = $_SERVER['HTTP_REFERER'];
$refarr = explode("/", $ref);
if ($refarr[2] == $oldBlogURL ){
$bloggerurl = '/'.$refarr[3].'/'.$refarr[4].'/'.$refarr[5];
$sqlstr = " SELECT wposts.guid FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'blogger_permalink' AND wpostmeta.meta_value = '".$bloggerurl."' ";
$wpurl = $wpdb->get_results($sqlstr, ARRAY_N);
if ($wpurl){
header( 'Location: '.$wpurl[0][0].' ') ;
exit;
}
}
== This is just another additional info from me ==
4. The next step is to removing your old blog from the search engine index. These are important to avoid duplicate content. If you don do this, then the Search Engine will penalize/ban your wordpress site for duplicate content. In order to do that, go to Dashboard > Setting > Basic. Set Let search engines find your blog? into no
5. If you have FeedBurner ID, you might as well changing that one. Go to your Feed, select one of your feed (if you happen to have more than one) click on Edit the Feed Details and change the original feed address into http://yourblog.com/feed (in Linux hosting) or http://yourblog.com/index.php/feed (in Windows hosting)
Thats it, i hope you enjoy this tutorial and your new wordpress as much as i do :)
Attention! To make the works, please replace [ with <