One of the things that has been skulking around my todo list for some time now has been to start using FeedBurner to track subscriber statistics. I only have a very vague concept of how many people subscribe to this blog and it would be great to get a more accurate idea.
So, how do I do this?
The way you choose to do this migration will be determined by the blogging software you use. If you use a hosted blogging solution it may be as simple as checking a box in your admin area, in which case you can stop reading now. However, as I am a bit of a techie I prefer to run my blog myself and for this I use the Serendipity blogging software.
First off, Serendipity normally supplies feeds with a URL along the lines of:
http://porteightyeight.com/feeds/index.rss2
But it then uses rewrite rules to redirect this to:
http://porteightyeight.com/?url=/feeds/index.rss2
I therefore pointed FeedBurner to the latter of these two. So now all we need to do is send any requests for /feeds/<a-file> off to FeedBurner. To do this I created a couple of rewrite rules in my Apache config:
RewriteEngine On
RewriteRule ^/feeds(/[^/]*)?$ http://feeds.feedburner.com/porteightyeight [R=301,L]
RewriteRule ^/rss.php http://feeds.feedburner.com/porteightyeight [R=301,L]
The first rules says "send any requests for /feeds/<a-file> (or simply /feeds) to http://feeds.feedburner.com/porteightyeight", and the second rule says the same but for rss.php*. The 'R=301' means that the browser is sent a 'Moved Permanently' header and the 'L' stops Apache from parsing any more rewrite rules if the rule in question was matched.
* My stats showed a handful of requests going to rss.php (which is a Serendipity file) so I wanted to make sure I caught those too.
Once setup you should find that all your feed requests are sent off to FeedBurner, and FeedBurner dutifully replies with your feed data.
Trackbacks