Heri R>
2006-Sep-19 18:32 UTC
routing: object_name.domain.com or controller_name.domain.com possible ?
hi list, is it possible in routes.rb or in other file controlled by my app to assign a subdomain to a controller or a model like for example i have a places controller, and an object named new-york, is there a way to have new-york.domain.com resolve to controller: places, action: show, :name new york ? thank you -- Heri R. http://sprinj.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jason Norris
2006-Sep-19 18:57 UTC
Re: routing: object_name.domain.com or controller_name.domain.com possible ?
I may be wrong, but I believe you need to do that sort of mapping in your httpd configuration. I''m fairly new at Rails, and I''ve only set up lighttpd once, but I believe what you need to use is mod_rewrite after defining your fastcgi server. Jason Heri R> wrote:> > hi list, > > is it possible in routes.rb or in other file controlled by my app to > assign a subdomain to a controller or a model > > like for example i have a places controller, and an object named > new-york, is there a way to have > > new-york.domain.com <http://new-york.domain.com> resolve to > controller: places, action: show, :name new york ? > > thank you > > > -- > Heri R. > http://sprinj.com > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---