Robby on Rails: Apache, Typo, and Feedburnerthoughts.sort_by{|t| t[:topic]}.collect tag:www.robbyonrails.com,2005:TypoTypo2006-09-10T16:41:07-04:00Robby Russellurn:uuid:85328eff-4648-4b08-85b3-613be6e3fc662006-09-08T16:51:00-04:002006-09-10T16:41:07-04:00Apache, Typo, and Feedburner<p>A few weeks ago, I started using FeedBurner and posted a blog entry about <a href="http://www.robbyonrails.com/articles/2006/08/22/feedburner-and-lighttpd-redirects">how I configured Lighttpd</a> to handle that so it didn’t disrupt everyone that subscribes to my <span class="caps">RSS</span> feed. This was working great… until the other day.. when I <a href="http://www.robbyonrails.com/articles/2006/09/05/typo-upgraded-to-trunk">upgraded to Typo trunk</a>. 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?</p>
<p>A ha! I was handling the redirect with Lighttpd and had replaced it with Pound.</p>
<p>So, I am now delegating this to Apache.</p>
<div class="typocode"><pre><code class="typocode_ruby "> <span class="comment"># Redirect typo feeds to FeedBurner</span>
<span class="constant">RewriteCond</span> <span class="punct">%{</span><span class="string">HTTP_USER_AGENT</span><span class="punct">}</span> <span class="punct">!^</span><span class="constant">FeedBurner</span><span class="punct">.*</span><span class="global">$</span>
<span class="ident">RewriteRule</span> <span class="punct">/</span><span class="ident">xml</span><span class="punct">/(</span><span class="ident">atom</span><span class="punct">|</span><span class="ident">rss</span><span class="punct">|</span><span class="ident">rss20</span><span class="punct">)/</span><span class="ident">feed</span><span class="punct">.</span><span class="ident">xml</span><span class="global">$ </span><span class="ident">http</span><span class="punct">:/</span><span class="regex"></span><span class="punct">/</span><span class="ident">feeds</span><span class="punct">.</span><span class="ident">feedburner</span><span class="punct">.</span><span class="ident">com</span><span class="punct">/</span><span class="constant">RobbyOnRails</span> <span class="punct">[</span><span class="constant">R</span><span class="punct">=</span><span class="ident">temp</span><span class="punct">,</span><span class="constant">L</span><span class="punct">]</span></code></pre></div>
<p>...and all was well again.</p>
<p><strong><span class="caps">UPDATE</span></strong></p>
<p>The rewrite condition should be <code>!^FeedBurner.*$</code> not <code>!^FeedBurner$</code>.</p><p>A few weeks ago, I started using FeedBurner and posted a blog entry about <a href="http://www.robbyonrails.com/articles/2006/08/22/feedburner-and-lighttpd-redirects">how I configured Lighttpd</a> to handle that so it didn’t disrupt everyone that subscribes to my <span class="caps">RSS</span> feed. This was working great… until the other day.. when I <a href="http://www.robbyonrails.com/articles/2006/09/05/typo-upgraded-to-trunk">upgraded to Typo trunk</a>. 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?</p>
<p>A ha! I was handling the redirect with Lighttpd and had replaced it with Pound.</p>
<p>So, I am now delegating this to Apache.</p>
<div class="typocode"><pre><code class="typocode_ruby "> <span class="comment"># Redirect typo feeds to FeedBurner</span>
<span class="constant">RewriteCond</span> <span class="punct">%{</span><span class="string">HTTP_USER_AGENT</span><span class="punct">}</span> <span class="punct">!^</span><span class="constant">FeedBurner</span><span class="punct">.*</span><span class="global">$</span>
<span class="ident">RewriteRule</span> <span class="punct">/</span><span class="ident">xml</span><span class="punct">/(</span><span class="ident">atom</span><span class="punct">|</span><span class="ident">rss</span><span class="punct">|</span><span class="ident">rss20</span><span class="punct">)/</span><span class="ident">feed</span><span class="punct">.</span><span class="ident">xml</span><span class="global">$ </span><span class="ident">http</span><span class="punct">:/</span><span class="regex"></span><span class="punct">/</span><span class="ident">feeds</span><span class="punct">.</span><span class="ident">feedburner</span><span class="punct">.</span><span class="ident">com</span><span class="punct">/</span><span class="constant">RobbyOnRails</span> <span class="punct">[</span><span class="constant">R</span><span class="punct">=</span><span class="ident">temp</span><span class="punct">,</span><span class="constant">L</span><span class="punct">]</span></code></pre></div>
<p>...and all was well again.</p>
<p><strong><span class="caps">UPDATE</span></strong></p>
<p>The rewrite condition should be <code>!^FeedBurner.*$</code> not <code>!^FeedBurner$</code>.</p>