Hi Everyone,
I need to run Rails off of a (virtual) subdirectory of our main
site. I checked back on the list and set up a configuration which
works, except for one thing.
The app is located under the virtual subdir ''u2''
accessing: http://example.com/u2/home
redirects to: http://example.com/home
resulting in a 404 not found error
accessing: http://example.com/u2/home/
does the correct thing, loading the index action of the home controller.
Note the difference in the trailing slash. The application works perfectly
otherwise.
Can anyone help? My setup is:
1. symlink from htdocs/u2 to rubyapp/public
2. changed 1 line in .htaccess to read:
RewriteBase /u2/dispatch.fcgi
3. relevant section of httpd.conf:
VirtualHost 192.168.2.2:80>
ServerAdmin webmaster-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org
DocumentRoot /data/sites/example.com/htdocs
ServerName www.example.com
ServerAlias example.com *.example.com
ErrorLog /data/sites/example.com/log/error_log
CustomLog /data/sites/example.com/log/access_log combined
... (standard directory and script alias stuff) ...
<Directory /sites/example.com/exampleruby/site/public/>
Options ExecCGI FollowSymLinks
AddHandler cgi-script .cgi
AllowOverride all
Allow from all
Order allow,deny
</Directory>
</VirtualHost>
Thanks in advance,
Lee