I need to host two rails app in one server and I don't have so many domain names. So I followed http://mattconnolly.wordpress.com/2010/09/19/redmine-ruby-on-rails-without-virtual-hosts/ which works. The root url changes from http://{virtual-host}/ to http://{main-domain}/railsapp/
My problem is when I do something like:
redirect_to root_path
I am redirected to http://{main-domain}/ instead of http://{main-domain}/railsapp/ as expected. I can of course
redirect_to '/railsapp'
but is there a better way than to repeat /railsapp all over the app?