Hi everyone, I''m struggling to get my routing as I want it... I want to create a regular expression that will only allow the controller/action to be executed if the subdomain is not ''www''. I have soemthing like this: map.connect '':controller/:action/:id'' , :conditions => { :subdomain => /(!www)/} only it seems to block everything (including subdomain.localhost.com/blog)... What''s the right way to do it? I''m not even sure that''s what I need at all :) I''m trying to figure out the right way to handle a site with multiple subdomains (user profiles) so that some controllers are only avaialable if you access them through a subdomain. has someone managed to figure it out and can shed some light? Thanks! ehud -- Posted via http://www.ruby-forum.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?hl=en -~----------~----~----~----~------~----~------~--~---
Ehud Rosenberg wrote:> Hi everyone, > I''m struggling to get my routing as I want it... > I want to create a regular expression that will only allow the > controller/action to be executed if the subdomain is not ''www''. > > I have soemthing like this: > map.connect '':controller/:action/:id'' , :conditions => { :subdomain => > /(!www)/} > > only it seems to block everything (including > subdomain.localhost.com/blog)... > What''s the right way to do it? > > I''m not even sure that''s what I need at all :) > I''m trying to figure out the right way to handle a site with multiple > subdomains (user profiles) so that some controllers are only avaialable > if you access them through a subdomain. has someone managed to figure it > out and can shed some light? > > Thanks! > ehudWhat i''m looking for is kind of like what''s described in the groovie manual here: http://routes.groovie.org/manual.html#sub-domain-support does something like this exist in rails? -- Posted via http://www.ruby-forum.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?hl=en -~----------~----~----~----~------~----~------~--~---