Subdomain URL Rewriting and Web Apps
- by Igor K
So a lot of web apps have the customer choose their own subdomain, ie mycompany.webapp.com
Presumably, every subdomain works off the same set of files and the unique subdomain is perhaps stored as a session object. So how does the URL rewriting work?
If someone goes to mycompany.webapp.com, you have to rewrite their unique address to a dynamic page to set the session variable, ie webapp.com/mypage.php?cusomer=mycompany
But then when you redirected, you'd be at webapp.com/theappdirectory/ and not mycompany.webapp.com/
So how do they do it?