FeedBurner and lighttpd redirects 3
I haven’t been using feedburner to track counts of subscribers to my feed. I didn’t want to tell everyone to switch their feed URL… so I found this solution for handling this transition through Lighttpd.
First, make sure you are requiring the mod_redirect module.
server.modules = ( "mod_rewrite", "mod_fastcgi", "mod_compress", "mod_redirect" )
Then add the following… to your lighty configuration.
$HTTP["useragent"] !~ "FeedBurner" {
url.redirect = (
"/xml/rss/feed.xml" => "http://feeds.feedburner.com/RobbyOnRails",
"/xml/rss20/feed.xml" => "http://feeds.feedburner.com/RobbyOnRails",
"/xml/atom/feed.xml" => "http://feeds.feedburner.com/RobbyOnRails"
)
}
Works like a charm!
Thanks to Damien Tanner for putting me on the right path.
Enjoying the content? Be sure to subscribe to my RSS feed.





If you want to ‘DRY’ this up a bit try the following:
url.redirect = (”/xml/(atom|rss|rss20)/feed.xml” => “http://feeds.feedburner.com/RobbyOnRails”)
Sweet. I like the DRY approach Josh. I wonder if there is something similar for the RedirectPermanent Apache directive.
I answered my own question [here](http://shanesbrain.net/articles/2006/08/27/feedburner-integration-in-typo).