How to Redirect Drupal RSS Feed to Feedburner with Ease

In spite of running this blog for almost 2 years, I never added its feed to Feedburner, however I should have done this from the beginning. But bad memory did its evil job ;)

When you add your feed to Feedburner in return you get a new url for you feed like this http://feeds.feedburner.com/timonweb. And then you need to update rss feed url's on your Drupal site to this new one. Moreover, you can encounter with a problem: "What to do with previous subscribers, how to force them using Feedburner's feed?". You may want to do this, because Feedburner provides different cool addons to your feed such as click-through statistics.

Ok, doing this is pretty simple, just go to your Drupal root and find .htaccess file. Open it and somewhere at the top add this code:

  1. ## START: FeedBurner redirects
  2. RewriteCond %{HTTP_USER_AGENT} !FeedBurner
  3. RewriteRule ^rss.xml$ http://feeds.feedburner.com/timonweb [R=temp,L]
  4. ## END: FeedBurner redirects

Note changing 'timonweb' to your own Feedburner ID. From now on, everyone who uses your main Drupal RSS feed which looks like: http://somedrupalsite.com/rss.xml will be redirected to Feedburner processed RSS feed. That's all. No more code changes, no more jumping through the hoop. Enjoy your Drupal.

UPD: Please read comments section. People there gave good solutions for managing multiple feeds. Thank you all!