Fix the Apache trailing slash problem
Posted by Chris Sun, 17 Jun 2007 10:48:00 GMT
After a lot of stuffing about I finally found a solution to the problem that I was having with the URL for this blog.
The basic problem was that the link http://www.drinkingbird.net/blog (without the trailing slash) was being rejected with a 400 Bad Request error.
I spent ages trying to get this to work with awkward rewrite rules in the parent directory, when I should have been looking in the public directory of the rails app. The solution is well enough explained over at LavaFactory.
I just made one small refinement, which is to change:
RewriteRule .*/blog/(.*) http://www.drinkingbird.net/blog/$1 [L,R]to
RewriteRule (.*)/blog/(.*) $1/blog/$2to satisfy my relentless desire to avoid configuration tied to a particular domain.
