DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Making Symbolic Linked Rails Apps Work When Folder Accessed With No Trailing Slash
Snippets is at bigbold.com/snippets/ but bigbold.com/snippets always failed with "Bad Request". bigbold.com/snippets always seemed to rewrite into 'snippets.html' for some reason, so this change to .htaccess cures it:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !snippets\.html
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteRule snippets\.html /snippets/ [R]Replace snippets with the name of your own folder, obviously.






Comments
Snippets Manager replied on Sat, 2006/08/19 - 11:46am
RewriteRule ^.*myapp$ http://%{HTTP_HOST}/myapp/ [R=301,L]where 'myapp' is the name of the application. It's now working at last :-) Cheers, JamesSnippets Manager replied on Mon, 2012/05/07 - 2:13pm
Snippets Manager replied on Mon, 2012/05/07 - 2:13pm