3 ms·
How to do Basecamp-style subdomains in Rails
- neovive 18y agoDoes 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-subdomain-user-accounts-in-a-webapp http://stackoverflow.com/questions/1180/how-to-make-subdomai...
- mdasen 18y ago$_SERVER['HTTP_HOST'] Parse that to get the first part of it like in the example.