Hello,
I''m trying to iron out some issues with a Rails app that is deployed in
a subdirectory, i.e. http://www.blah.com/railsapp/. My scenario is
pretty well illustrated by this page on the wiki:
http://wiki.rubyonrails.com/rails/show/HowtoDeployRailsAppUnderDirectory
I read somewhere that routes.rb is intended to provide functionality to
replace Apache rewrite rules in the .htaccess file, but there are two
things that I can''t figure out how to do without using Apache rewrites:
1) When the user requests www.blah.com/railsapp/, Apache needs to see
the request as www.blah.com/railsapp/public/ instead. In most of the
rails tutorials, this is accomplished in httpd.conf by configuring the
application as its own virtual host with ''public'' as the root
directory. But when you aren''t creating a new vhost, what do people
consider to be the cleanest way to get the requester into the
''public''
directory?
2) Next, when Apache processes the request for
www.blah.com/railsapp/public, how does it know to process the dispatch
file?
My understanding is that routes.rb does not enter the picture until the
dispatch file is being processed. And so I''m assuming that it cannot
entirely replace Apache rewriting (to get to the dispatch in the first
place), but I''d love to hear ideas or suggestions for a better way to
do this.
Thanks for any input,
Jay