Hacker News new | past | comments | ask | show | jobs | submit login
How to do Basecamp-style subdomains in Rails (37signals.com)
4 points by peter123 on Jan 8, 2009 | hide | past | favorite | 2 comments



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...


$_SERVER['HTTP_HOST']

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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: