Forum: Ruby on Rails How to set a root URL ?

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.
5ebc4a174dc36f92f35f94355fecbc11?d=identicon&s=25 Pierre L (Guest)
on 2009-02-09 13:57
(Received via mailing list)
Hello,

My server installation of RoR is working but I still have a problem
with routes. I would like the root URL of my site to be some thing
like mydomain.com/mysite/ . But this is not working since Rails
include the '/mysite/' in his routing. Of course, if in all
connections in routes.rb I add '/mysite', all is working, but is there
another way to tell Rails that my root URL is not '/' ?

Thank you for all,
Pierre L.
A91bd6cef23eb3516245a092e196c4da?d=identicon&s=25 Maurício Linhares (mauricio)
on 2009-02-09 14:00
(Received via mailing list)
AFIK, no, there isn't.

What you could do, if you really need something like this (I can't see
a reason...) is, at the "root_path" redirect to this URL that you want
to be your root.

-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)
4dd8ed31b9effe2ee868e4cf78495c98?d=identicon&s=25 James Mitchell (Guest)
on 2009-02-09 15:18
(Received via mailing list)
Is your app fronted by Apache?

--
James Mitchell
5ebc4a174dc36f92f35f94355fecbc11?d=identicon&s=25 Pierre L (Guest)
on 2009-02-09 15:25
(Received via mailing list)
Yes it is ! Is there a solution with the htaccess ?
5ebc4a174dc36f92f35f94355fecbc11?d=identicon&s=25 Pierre L (Guest)
on 2009-02-09 15:29
(Received via mailing list)
In fact, my site is still in development, I don't want to put it on
the root of my domain, but in a directory.
I think I miss something simple because I've done tests few months ago
and all was ok.

On 9 fév, 13:59, Maurício Linhares <mauricio.linha...@gmail.com>
5ebc4a174dc36f92f35f94355fecbc11?d=identicon&s=25 Pierre L (Guest)
on 2009-02-09 18:57
(Received via mailing list)
I've found : all one have to do it to put
config.action_controller.relative_url_root = '/yourpath'
in the config file.
This topic is locked and can not be replied to.