Here’s a problem I ran into when migrating from b2evolution to WordPress: my old RSS feed, which was running through multiple aggregators across the web, suddenly didn’t work anymore. The obvious (and painful) solution was to manually inform every system and person who cares about my blog that I’m now on a new feed. I was already diving into that that task, and planning to let a few systems drop off the wayside in the process.
Thankfully, Jordan M.E. (one of my favorite programmers), sent me the easier answer. She told me to use an htaccess redirect, so the old feed becomes the new feed. Here’s the code that I added to my root level (http://www.sarahdopp.com) .htaccess file (it should all be on one line):
Redirect permanent /blog/xmlsrv/rss2.php http://www.sarahdopp.com/blog/?feed=rss2&
In this example, “/blog/xmlsrv/rss2.php” is the path of my old RSS feed, and “/blog/?feed=rss2&” is the path of my new RSS feed. You need the “Redirect permanent” at the beginning to make it work. See it in action. This is the link to my old feed:
Check the address bar after you click the link. You’re at my new feed. Voila!
If you’ve never edited your .htaccess file, it’s not as scary as it sounds. It’s just a text file with a funny file extension that controls some key things about your website. Some people have trouble opening the file because of its strange file name, so here’s a trick (note: you have to be comfortable with FTP to do this):
- Using your FTP client, find the .htaccess file on your webserver and rename it to htaccess.txt.
- Download the file.
- Open it in the code editor of your choice.
- Make the changes you want to make (see above) and save it.
- Upload it to your website.
- Change the filename back to .htaccess.
So now, everybody who was reading my old blog can now see my new blog, as though nothing changed.Â Well, they’re probably a little confused because I disappeared for awhile, and their aggregators may now be reloading new copies all my stuff, but hey.Â Close enough.