<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Phusion, Rack, Sinatra, and sub-domains</title>
	<atom:link href="http://blog.ardekantur.com/2008/07/phusion-rack-sinatra-and-sub-domains/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ardekantur.com/2008/07/phusion-rack-sinatra-and-sub-domains/</link>
	<description>Computer Science, Ruby, and Software Engineering.</description>
	<lastBuildDate>Thu, 11 Feb 2010 05:57:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: subdomains - StartTags.com</title>
		<link>http://blog.ardekantur.com/2008/07/phusion-rack-sinatra-and-sub-domains/comment-page-1/#comment-11367</link>
		<dc:creator>subdomains - StartTags.com</dc:creator>
		<pubDate>Tue, 26 Jan 2010 15:29:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ardekantur.com/?p=105#comment-11367</guid>
		<description>&lt;p&gt;[...] the information on the main domain and other subdomains anyway, this won&#039;t affect most people. ...Phusion, Rack, Sinatra, and sub-domains : ArdekanturPhusion, Rack, Sinatra, and sub-domains. by Ardekantur. I&#039;ve spent the past couple of hours futzing [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] the information on the main domain and other subdomains anyway, this won&#39;t affect most people. &#8230;Phusion, Rack, Sinatra, and sub-domains : ArdekanturPhusion, Rack, Sinatra, and sub-domains. by Ardekantur. I&#39;ve spent the past couple of hours futzing [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Implementing a lightweight service with Sinatra - Circulatable: a Librarian&#8217;s Group</title>
		<link>http://blog.ardekantur.com/2008/07/phusion-rack-sinatra-and-sub-domains/comment-page-1/#comment-10436</link>
		<dc:creator>Implementing a lightweight service with Sinatra - Circulatable: a Librarian&#8217;s Group</dc:creator>
		<pubDate>Wed, 09 Dec 2009 18:00:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ardekantur.com/?p=105#comment-10436</guid>
		<description>&lt;p&gt;[...] Phusion, Rack, Sinatra, and sub-domains [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Phusion, Rack, Sinatra, and sub-domains [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ardekantur</title>
		<link>http://blog.ardekantur.com/2008/07/phusion-rack-sinatra-and-sub-domains/comment-page-1/#comment-2311</link>
		<dc:creator>Ardekantur</dc:creator>
		<pubDate>Tue, 09 Dec 2008 17:33:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ardekantur.com/?p=105#comment-2311</guid>
		<description>&lt;p&gt;To everyone who stumbles onto this post, I&#039;ve started using a Sinatra before filter I found somewhere to take care of this for me on the application level:&lt;/p&gt;

&lt;p&gt;&lt;pre lang=&#039;ruby&#039;&gt;
before do 
  # kill trailing slashes for all requests except &#039;/&#039;
  request.env[&#039;PATH_INFO&#039;].gsub!(/\/$/, &#039;&#039;) if request.env[&#039;PATH_INFO&#039;] != &#039;/&#039;
end
&lt;/pre&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>To everyone who stumbles onto this post, I&#8217;ve started using a Sinatra before filter I found somewhere to take care of this for me on the application level:</p>

<p>

</p>
<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">before <span style="color:#9966CC; font-weight:bold;">do</span> 
  <span style="color:#008000; font-style:italic;"># kill trailing slashes for all requests except '/'</span>
  request.<span style="color:#9900CC;">env</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'PATH_INFO'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#CC0066; font-weight:bold;">gsub!</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>\<span style="color:#006600; font-weight:bold;">/</span>$<span style="color:#006600; font-weight:bold;">/</span>, <span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">if</span> request.<span style="color:#9900CC;">env</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'PATH_INFO'</span><span style="color:#006600; font-weight:bold;">&#93;</span> != <span style="color:#996600;">'/'</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>


]]></content:encoded>
	</item>
	<item>
		<title>By: dubek</title>
		<link>http://blog.ardekantur.com/2008/07/phusion-rack-sinatra-and-sub-domains/comment-page-1/#comment-2310</link>
		<dc:creator>dubek</dc:creator>
		<pubDate>Tue, 09 Dec 2008 17:22:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ardekantur.com/?p=105#comment-2310</guid>
		<description>&lt;p&gt;Thanks.&lt;/p&gt;

&lt;p&gt;I solved it without disabling mod_autoindex, but by adding a rewrite rule which rewrites the trailing-slash URL to a non-trailing-slash URL (I don&#039;t need these two different endpoints).&lt;/p&gt;

&lt;p&gt;Just add these two lines inside your VirtualHost section:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;&lt;code&gt;RewriteEngine on
RewriteRule ^(/[^/]*)/$ $1 [R]
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks.</p>

<p>I solved it without disabling mod_autoindex, but by adding a rewrite rule which rewrites the trailing-slash URL to a non-trailing-slash URL (I don&#8217;t need these two different endpoints).</p>

<p>Just add these two lines inside your VirtualHost section:</p>

<p><pre><code>RewriteEngine on
RewriteRule ^(/[^/]*)/$ $1 [R]
</code></pre></p>]]></content:encoded>
	</item>
	<item>
		<title>By: adam</title>
		<link>http://blog.ardekantur.com/2008/07/phusion-rack-sinatra-and-sub-domains/comment-page-1/#comment-956</link>
		<dc:creator>adam</dc:creator>
		<pubDate>Mon, 28 Jul 2008 07:49:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ardekantur.com/?p=105#comment-956</guid>
		<description>&lt;p&gt;Thank you for this awesome post! I had been trying to figure this out with Camping ever since Phusion put Rack support into Passenger and was too dim to figure out what was going on. Thanks again!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you for this awesome post! I had been trying to figure this out with Camping ever since Phusion put Rack support into Passenger and was too dim to figure out what was going on. Thanks again!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ardekantur</title>
		<link>http://blog.ardekantur.com/2008/07/phusion-rack-sinatra-and-sub-domains/comment-page-1/#comment-955</link>
		<dc:creator>Ardekantur</dc:creator>
		<pubDate>Sun, 27 Jul 2008 20:20:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ardekantur.com/?p=105#comment-955</guid>
		<description>&lt;p&gt;Hongli -&lt;/p&gt;

&lt;p&gt;Thanks for your quick response. I tried explicitly declaring RailsAllodModRewrite off in my VirtualHost configuration, since the documentation implies it&#039;s off by default, but no dice. Clearly it&#039;s some kind of bizarre configuration overlap. I&#039;ll try and see if I can narrow the problem down and provide a test case.&lt;/p&gt;

&lt;p&gt;As it turns out, disabling mod_autoindex solves the problem fairly succinctly, but I have no use for autoindex. I have no idea what would be done if someone did need it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hongli -</p>

<p>Thanks for your quick response. I tried explicitly declaring RailsAllodModRewrite off in my VirtualHost configuration, since the documentation implies it&#8217;s off by default, but no dice. Clearly it&#8217;s some kind of bizarre configuration overlap. I&#8217;ll try and see if I can narrow the problem down and provide a test case.</p>

<p>As it turns out, disabling mod_autoindex solves the problem fairly succinctly, but I have no use for autoindex. I have no idea what would be done if someone did need it.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli Lai</title>
		<link>http://blog.ardekantur.com/2008/07/phusion-rack-sinatra-and-sub-domains/comment-page-1/#comment-954</link>
		<dc:creator>Hongli Lai</dc:creator>
		<pubDate>Sun, 27 Jul 2008 20:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ardekantur.com/?p=105#comment-954</guid>
		<description>&lt;p&gt;/sinatra_test/ (with the trailing slash) is handled by Apache&#039;s directory handler. It&#039;s trying to display a directory index.&lt;/p&gt;

&lt;p&gt;I suppose this could be considered a &quot;bug&quot;, but it&#039;s really quite a mess. There are so many combinations of Apache modules, that it&#039;s almost impossible to get everything right. Help/patches will be much appreciated.&lt;/p&gt;

&lt;p&gt;I believe the problem you experience only occurs if RailsAllowModRewrite is on.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>/sinatra_test/ (with the trailing slash) is handled by Apache&#8217;s directory handler. It&#8217;s trying to display a directory index.</p>

<p>I suppose this could be considered a &#8220;bug&#8221;, but it&#8217;s really quite a mess. There are so many combinations of Apache modules, that it&#8217;s almost impossible to get everything right. Help/patches will be much appreciated.</p>

<p>I believe the problem you experience only occurs if RailsAllowModRewrite is on.</p>]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.787 seconds -->
