FeedBurner provides all kinds of neat stats, but it didn't seem straight-forward to "burn" my blog feed since I'm using Drupal 5. After a little fiddling I think I've got a pretty good idea how to make it work in probably the simplest way possible. In fact, it doesn't require and Drupal configuration at all.
http://ianloic.com/rss.xml
. Now when I access
http://feeds.feedburner.com/ianloic I get the contents of that feed.
It's pretty simple, but so far nobody is going to see that feed.
.htaccess
file containing a bunch of stuff. I
just added a few lines to the mod_rewrite.c
block of that
file:
# Rewrite rss.xml to http://feeds.feedburner.com/ianloic # unless FeedBurner is requesting the feed RewriteCond %{HTTP_HOST} ^ianloic\.com$ [NC] RewriteCond %{HTTP_USER_AGENT} !FeedBurner.* RewriteRule ^rss.xml$ http://feeds.feedburner.com/ianloic [L,R=301]This will cause Apache to send a 301 redirect to
http://feeds.feedburner.com/ianloic
any time anyone
requests http://ianloic.com/rss.xml
, unless their HTTP
User Agent begins with FeedBurner
.
Now I've got access to all the FeedBurner statistics and fun features. Since I didn't actually touch the Drupal configuration I'm pretty sure a similar approach can be taken to applying FeedBurner to any feed.