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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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) On Mon, Feb 9, 2009 at 9:57 AM, Pierre L <pierre.lairez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Is your app fronted by Apache? -- James Mitchell On Mon, Feb 9, 2009 at 7:57 AM, Pierre L <pierre.lairez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes it is ! Is there a solution with the htaccess ? On 9 fév, 14:03, James Mitchell <jmitc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is your app fronted by Apache? > > -- > James Mitchell > > > > On Mon, Feb 9, 2009 at 7:57 AM, Pierre L <pierre.lai...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 Linhareshttp://alinhavado.wordpress.com/(pt-br) |http://blog.codevader.com/(en) > > > > On Mon, Feb 9, 2009 at 9:57 AM, Pierre L <pierre.lai...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve found : all one have to do it to put config.action_controller.relative_url_root = ''/yourpath'' in the config file. On 9 fév, 13:57, Pierre L <pierre.lai...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---