Redirect WordPress Feeds

Moving my blog was a pain in the ass, the most difficult part was to mantain the redirections so search engines and feedreaders could still access my new blog using the same URLs and without the users having to change anything.

Since there was no much help online, here is how to make a 301 http redirect that will allow all requests and QUERY STRINGS passed to your root folder to be redirected somewhere else.

<?
header( “HTTP/1.1 301 Moved Permanently” );
header( “Status: 301 Moved Permanently” );
header( “Location: http://www.charafantah.com/wordpress/?”.$_SERVER[‘QUERY_STRING’]);

exit(0);

?>

Save this as index.php of your old location, this way if your old feed used any querystring parameters e.g. /?feed=rss2  it will be redirected properly, also direct access to your old blog home, will be redirected to the new place.