I set up FeedBurner for my main blog XML feed this afternoon. Pretty painless, and it appears that everything is all hunky-dory. However I figured I'd mention it in case there are problems so you'll know why.
Here's the Apache config I used (wrapped for readability):
RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC] RewriteRule ^/barneyblog/(feed(/atom|/rss)?/?|wp-rss2?.php)$ http://feeds2.feedburner.com/barneyblog/ [P,L]
Why use mod_rewrite instead of one of several WordPress plugins, you ask?
First, the one linked to by FeedBurner itself (and which it hosts) returns a 404. If it had worked, I probably would have just left it, but it didn't. I didn't bother to go searching, since mod_rewrite can do the dirty work.
Second, I didn't really want to do the redirect that a plugin would have used. If you go hit my feed at http://www.barneyb.com/barneyblog/feed/, you'll notice that appears to be self-hosted, and yet has FeedBurner content. That URL has always been my feed URL, and will continue to be so. It's all about that magic "P" in the RewriteRule. Flip it to an "R" and you have the "normal" behaviour of redirecting over to FeedBurner, at the expense of no longer controlling the URL. With the redirect anyone who isn't careful (which is anyone that doesn't use autodiscovery, and probably a lot of apps that do use it), will inadvertantly get a non-canonical URL for the feed, and get it in the pants if it ever changes (regardless of whether the canonical URL remains constant). With proxying, I've protected myself from that. And yes, I know the "L" is redundant; you already know I'm weird.
Comments are closed.