Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 17:59:00 GMT)

Apache, Typo, and Feedburner

Posted by Fri, 08 Sep 2006 21:51:00 GMT

A few weeks ago, I started using FeedBurner and posted a blog entry about how I configured Lighttpd to handle that so it didn’t disrupt everyone that subscribes to my RSS feed. This was working great… until the other day.. when I upgraded to Typo trunk. When I did this, I decided to start using mongrel::cluster and pound. Two days later… I’m noticing that my subscriber count has dropped over thousand people in a day… was it something that I said?

A ha! I was handling the redirect with Lighttpd and had replaced it with Pound.

So, I am now delegating this to Apache.

  # Redirect typo feeds to FeedBurner
  RewriteCond %{HTTP_USER_AGENT} !^FeedBurner.*$
  RewriteRule /xml/(atom|rss|rss20)/feed.xml$ http://feeds.feedburner.com/RobbyOnRails [R=temp,L]

...and all was well again.

UPDATE

The rewrite condition should be !^FeedBurner.*$ not !^FeedBurner$.

FeedBurner and lighttpd redirects

Posted by Tue, 22 Aug 2006 20:28:00 GMT

3 comments Latest by Shane Vitarana Mon, 28 Aug 2006 00:14:42 GMT

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.