How to build a web site which gives a sub-domain dynamically to every registered user?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1841006/create-subdomain-upon-user-registration">Create subdomain upon user registration</a>  </p>
</blockquote>



<p>Suppose I have a site, and I wish to give a sub-domain for each registered users.
Like my site, <code>http://site.com/</code>.</p>

<p>And the <code>test-user</code> is a user registered on my site, and the site wants to make a sub-domain for that user. </p>

<p>Like <code>http://test-user.site.com</code>.</p>

<p>Like <code>http://test-user1.site.com</code> for test-user1.</p>

<p>I hope you understood the requirement. How can I create a sub-domain using my sites back-end
or dynamically while registering?</p>
