I have searched around the forums for different topics on dynamic subdomains. I believe that I will need to add some sort of wild card in for the domain, but am not sure exactly what needs to be added to make this happen.
Here is the scenario of what I am trying to have happen. If you have used or seen Freshbooks, its the similar functionality for their login system.
I would like to be able to browse to http://businessname.mydomain.com and with using sessions and the system I have built, have that page show the same thing as if they were to go to http://www.mydomain.com/login.php?id=businessname using my .htaccess file now I have cleaned this url up to look like, http://www.mydomain.com/login/businessname. The PHP on that page gets that businessname, does a mysql query on the database to get the actual name of the company, and then when the user attempts to log in, it will query only the users in the database associated with that business.. I hope that wasn't too much rambling about how I am looking to have it function. But I basically would like it so that I could have http://businessname.mydomain.com and be able to pull the businessname part from the URL into the page to do the lookup for that business.
What would be the best way to set my .htaccess file up to enable me to be able to use these kind of subdomains?
Any suggestions would be greatly appreciated.
Thanks!
Travis