Routing: object_name.domain.com or controller_name.domain.co

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs