PDA

View Full Version : subdomain wildcards


tresero
12-16-2007, 11:21 AM
I am setting up a site for a non-profit with many chapters. I need to know if there is a way to pass all subdomains to my rails app. I can then let rails parse out the subdomain (if there is one).

I know there is a way to do this under apache, but I don't use Apache.

Thanks

mistwang
12-17-2007, 07:19 AM
Please refer to the listener to virtual host mapping section of our documentation.

tresero
12-17-2007, 09:44 AM
Unfortunately that doesn't help. I need something like Apache *.domain hosting.
I just want to get the subdomain passed and let my controller handle what to do with it. Also, new chapters are added and are already in a DB, I don't want to forget to add a new chapter by hand, and the client isn't savvy enough to muck with config files.

Jon

mistwang
12-17-2007, 02:15 PM
Yes, you can create a Rails virtual host to handle all *.domain, just use "*.domain" as the mapping between the listener and that vhost.