Forum: Ruby on Rails rails public root

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
mike (Guest)
on 2007-07-16 20:17
(Received via mailing list)
hi,

i'm planning to deploy with a cluster of mongrels behind apache and i
have everything working ok but i'm wondering how to redirect users
from the root path (i.e. mydomain.com/ ) to what i want to be my
default controller/action?

should i have a routes.rb entry that handles this or should apache
rewrite the url?

thanks,
mike
Jodi S. (Guest)
on 2007-07-16 20:27
(Received via mailing list)
Hey Mike -

On 16-Jul-07, at 12:17 PM, mike wrote:

>
> thanks,
> mike
>

Myself, I'd prefer to have this controlled by rails as I like to have
as much app logic residing there.

to use rails you'd add a route such as,

map.connect '', :controller => "some_controller", :action =>
"some_action"

There's a commented out route like that in your default routes config.

Jodi
This topic is locked and can not be replied to.