Robby on Rails: FeedBurner and lighttpd redirectsthoughts.sort_by{|t| t[:topic]}.collect tag:www.robbyonrails.com,2005:TypoTypo2006-09-05T22:12:48-04:00Robby Russellurn:uuid:b9f0c8a5-f9de-41d0-ab66-23f104cb64152006-08-22T15:28:00-04:002006-09-05T22:12:48-04:00FeedBurner and lighttpd redirects<p>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 <span class="caps">URL</span>… so I found this solution for handling this transition through Lighttpd.</p>
<p>First, make sure you are requiring the <code>mod_redirect</code> module.</p>
<pre><code>server.modules = ( "mod_rewrite", "mod_fastcgi", "mod_compress", "mod_redirect" )</code></pre>
<p>Then add the following… to your lighty configuration.</p>
<pre><code>
$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"
)
}
</code></pre>
<p>Works like a charm!</p>
<p>Thanks to <a href="http://www.iamrice.org">Damien Tanner</a> for putting me on <a href="http://iamrice.org/articles/2006/03/30/migrating-typo-feeds-to-feedburner">the right path</a>.</p><p>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 <span class="caps">URL</span>… so I found this solution for handling this transition through Lighttpd.</p>
<p>First, make sure you are requiring the <code>mod_redirect</code> module.</p>
<pre><code>server.modules = ( "mod_rewrite", "mod_fastcgi", "mod_compress", "mod_redirect" )</code></pre>
<p>Then add the following… to your lighty configuration.</p>
<pre><code>
$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"
)
}
</code></pre>
<p>Works like a charm!</p>
<p>Thanks to <a href="http://www.iamrice.org">Damien Tanner</a> for putting me on <a href="http://iamrice.org/articles/2006/03/30/migrating-typo-feeds-to-feedburner">the right path</a>.</p>
Shane Vitaranaurn:uuid:016a6f38-f6fe-4621-961d-3abfd96c0c6b2006-08-27T19:14:42-04:002006-09-05T22:12:54-04:00Comment on FeedBurner and lighttpd redirects by Shane Vitarana<p>I answered my own question [here](<a href="http://shanesbrain.net/articles/2006/08/27/feedburner-integration-in-typo" rel="nofollow">http://shanesbrain.net/articles/2006/08/27/feedburner-integration-in-typo</a>).</p>Shane Vitaranaurn:uuid:4a115f48-fa87-402c-bbcd-86eb295b65bc2006-08-27T12:43:42-04:002006-09-05T22:12:49-04:00Comment on FeedBurner and lighttpd redirects by Shane Vitarana<p>Sweet. I like the DRY approach Josh. I wonder if there is something similar for the RedirectPermanent Apache directive.</p>Josh Knowlesurn:uuid:12663274-7950-4994-911f-1c84322ff4d42006-08-23T20:20:33-04:002006-09-05T22:12:54-04:00Comment on FeedBurner and lighttpd redirects by Josh Knowles<p>If you want to ‘DRY’ this up a bit try the following:</p>
<p>url.redirect = (”/xml/(atom|rss|rss20)/feed.xml” => “<a href="http://feeds.feedburner.com/RobbyOnRails" rel="nofollow">http://feeds.feedburner.com/RobbyOnRails</a>”)</p>