
How to do Basecamp-style subdomains in Rails - peter123
http://www.37signals.com/svn/posts/1512-how-to-do-basecamp-style-subdomains-in-rails
======
neovive
Does anyone know of an equivalent solution in PHP? Since I use the KohanaPHP
framework, I assume this could be done in one of the routing routing or
pre_controller events.

EDIT: found a good approach at: [http://stackoverflow.com/questions/1180/how-
to-make-subdomai...](http://stackoverflow.com/questions/1180/how-to-make-
subdomain-user-accounts-in-a-webapp)

~~~
mdasen
$_SERVER['HTTP_HOST']

Parse that to get the first part of it like in the example.

