I would like to have subdomains for my web app like so:
- company1.mysite.com
- company2.mysite.com
How do I go about doing this? Do I need a virtual host set up per company?
Or can I have a catchall like:
- *.mysite.com
What's the typical approach here?
My thoughts on how to show the correct content is that I will take the prefix part of the URL, check the database for the id of that company, and then just use the id to bring back the correct content...
The problem is that i'm unsure of how to create subdomains programmatically in PHP and Apache.
I am using Windows (so locally I will be editing the windows host file)