I have apache 2.2 with mod_rails running at http://localhost. I want to have my rails app at http://localhost/railsBlog. So, what I did was, I created a virtual host:
ServerName localhost DocumentRoot /Library/WebServer/Documents RailsEnv development RailsBaseURI /railsBlog
Now, since the URL is http://localhost/railsBlog, the server views railsBlog as the controller I'm passing in, which is not what I want. So when I go to http://localhost/railsBlog/home/index. This won't get to my 'home' controller and 'index' view because it tries to go to 'railsBlog' controller (doesn't exist) and 'home' view (doesn't exist).
I think one way to solve this is to redefine map.root to be /railsBlog and things should be fine. But how?
Another way I could get around this would be to modify config/routes.rb to have:
map.connect 'railsBlog/:controller/:action/:id'
However, this would mean that I would have to change this file every time I deploy to a different location.
Or, is there any other way to get around this?