Forum: Ruby on Rails Trailing Slash Problems with Deployment on Shared Hosting Us

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
TeeC (Guest)
on 2007-02-07 04:13
(Received via mailing list)

I've been trying to deploy a simple Rails app for a friend on a shared
hosting account. I was able to get the Rails application running, but
the URL need to end in a slash or else it would result in a 400 Bad
Request error. After searching through the Rails I wiki found a page
on the exact same error (
+VHost+Installation, it's toward the bottom of the page). I tried the
suggestions there, and they allowed the app to load without the
trailing slash, but when the slash was on the URL it resulted in a 400
Has anyone had success with similar problems?

Here's my .htaccess file:
Options +FollowSymLinks +ExecCGI

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME}    -d
RewriteCond %{SCRIPT_FILENAME}      ^.*[^\/]$
RewriteRule ^(.*)$ $1/ [N]

RewriteBase /photos

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.cgi?$1 [QSA,L
This topic is locked and can not be replied to.