It is pretty common for bloggers to want to use FeedBurner to handle their RSS feeds, because of the additional benefits it offers, such as statistics, automatically adding AdSense ads to the feed and pinging services about your new content.
Traditionally, the advice has been to use the FD Feedburner Plugin, which does the trick just fine, don’t get me wrong. But as you should probably know by now, I prefer to handle such items with functions where possible. Because of the prevalence of people using the Feedburner plugin, it wasn’t easy to find too much information on this subject, but after doing some searching, I was able to nail down enough to put together my function which redirects all readers to my FeedBurner feed.
It would be a simpler function if not for the fact that you have to check whether the user-agent is FeedBurner. This is because you have to allow FeedBurner through to your site without being redirected, so that it can actually look at your content, while keeping the redirect in place for everyone else.
At any rate, without any further ado, here is the function, which I drew up with the help of Erik Shultz. Just drop it into your functions.php file and you’ll be set – just be sure to change the FeedBurner URL to that of your own feed!: