This is not the correct forum, but I don't see what the correct forum would be. Your issue would be a webserver-specific question--not a programming issue. HOWEVER, you could use PHP to redirect based on the URL...but I don't think that's what you are wanting.
What you want is normally configured in the web-server. For example, in Apache, you can create all the ServerName's you want and have each name (these could be subdomains) point to different web root directories.
http://httpd.apache.org/docs/2.2/mod...tml#servername
You don't normally have to do anything DNS wise if you have your DNS configured to direct all traffic to your domain to your webserver. It is your webserver that will serve the different content depending on which subdomain was requested.
So go ask your question in the