Ho to capture the domain name

Hi all

Is there a way to capture the domain name and form there open one
application or another.

I have to domains registered. domain1 and domain2

Is there a way when someone types www.domain1.com it calls a RoR page
that allows me to redirect the person to a specific application or to a
specific domain?

thanks

On Apr 24, 2007, at 5:26 PM, Jose P. wrote:

I have to domains registered. domain1 and domain2

Is there a way when someone types www.domain1.com it calls a RoR page
that allows me to redirect the person to a specific application or
to a
specific domain?

yes. look at the request object.

-faisal

the domain function
http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html#M000236