Dynamic subdomain - How to get that

These days all over the place I see something like http://john.blinksale.com and http://mary.blinksale.com

My question is how to configure the server to have these subdomains dynamically. Any pointer to an article/tutorial/book will be helpful.

-=- Raj


We’ve recently done this with DHH’s account_location plugin. You can get it here (http://dev.rubyonrails.org/svn/rails/plugins/account_location

Then have your ISP enable wildcard subdomains for your site. This will allow ***.yourdomain.com to be routed to yourdomain.com and then the plugin will take care of the rest. You’ll still need to do some coding to get it to work with the way you’ve developed your user accounts.


You could also do this with lighty and mod_mysql_vhost. or even mod_evhost if you don’t mind creating a directory dynamically instead of rows in a table.