Subdomains and Site
<p>I didn't know how to put this into to a title. Ok my idea is to have any subdomain working on my site, and for example if I type:</p>

<p>what.example.com</p>

<p>(my site has a unique folder for every subdomain, and within that folder, there is just a simple config file that sees the 'what' ( first part of subdomain) and loads database information based on the string and the whole site is populated. So if I put lol.example.com I have the same site, but with different information just based on database. Do you understand?</p>

<p>And then if people type the main site example.com or www.example.com they have the main site which is completely different from the subdomains.</p>

<p>So how can I do this? </p>

<p>I have this idea for a site of mine, in which the main site example.com will be a information site with a payment system. And when users pay me, I add their info to to an unique file where all other user info is located ( database info ), and then their site is whatever subdomain they have chosen .example.com , and there they have their info and can login.</p>

<p>edit: I just can't figure out how to allow any subdomain to be inserted in the url, loading the sub site, as grabbing the first part of the subdomain is easy and then everything would work.</p>

<p>any ideas or alternatives?</p>
