-
Wednesday 14th Jan 2009
Using Mod Rewrite to redirect an RSS feed to Feedburner.
Feedburner is a great service, but to get the benefit you need to direct people to the new URL feedburner provides you when you "burn" a feed. Instead of changing the link on your site, you can silently redirect new subscribers and old subscribers alike using .htaccess (requires Apache). Just create a file called .htaccess in the same folder as your feed with the following code. The file can be either .rss or .xml.
RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} !(.FeedBurner.) [NC] RewriteRule ^feedfilename.*$ http://feeds.feedburner.com/feedburnername [R=301,L]
Just change the name of your feed file, and the feedburner link. Once you have saved try and access the original feed link in a browser and you should find it automatically redirects to feedburner. If it does you are all set! This solution also redirects any people that may already be subscribed, including iTunes subscribers (in the case of Podcasts).
Page: 1

