variable in url

Hi all,

I want to build a url like this: name.site.com . Can RoR read out the
name in the url? If not I supose it's uo to the webserver. Can webrick
or Mongrel use this and pass this to RoR. I need the name in the url
since it will define what will be shown on the page.

Thanks
Stijn

I dont know exactly how it would be done, but i am sure that it can be
done. Take the USERNAME.highrisehq.com thing 37signals got going.

37signals use this in all their products but i want to know how they
do it.

Someone has an idea?

Thanks,
Stijn

Thanks alot!

Xin Zheng wrote:

_why's done it again.

http://redhanded.hobix.com/bits/dynamicVhostsOneLinerForRails.html

How you integrate it with url_for? So :controller => 'account',
:action => 'home_page', :id => user.login goes in, and a virtual host
URL comes out?