Hello…I use a hosting company that allows me to run multiple ruby apps
at the same time. To do that I’m required to do a re-write (.htaccess
entry) so that at incoming http requests can be directed to the right
app port.
It attempts to route it to a controller. Is this an issue I should fix
with .htaccess or routes.rb? I’ve attempted to do both without much
luck (not too good with .htaccess). I’m leaning towards some kind of
redirect in .htaccess but not sure if this is the best approach or how
to do it.
Any help is appreciated.
Thanks…Bill
The .htaccess file in your public directory has the following lines
which
you should uncomment / modify as required:
If your Rails application is accessed via an Alias directive,
then you MUST also set the RewriteBase in this htaccess file.
Example:
Alias /myrailsapp /path/to/myrailsapp/public
RewriteBase /myrailsapp
I hope that helps!
Regards,
Gustav P.
On Tue, Jul 21, 2009 at 6:56 AM, Bill McGuire <
Gustav…thanks for the quick reply. I ended up using the following
command in .htaccess which seems to be working:
Routing is “what happens when an application determines which controllers and actions are executed based on the URL requested.” Simply put, it is how the framework gets from to the Users controller and the list(Htaccess Redirect Generator) action.
Routing or router in web development is a mechanism where HTTP requests are routed to the code that handles them. To put simply, in the Router you determine what should happen when a user visits a certain page.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.