Regular expression and routing

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 :slight_smile:
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

Ehud R. 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 :slight_smile:
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

What 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?