In my web app, I'm toying with the idea of giving my user the opportunity to select a subdomain of their choosing, so they could select something like:
where foobar is their chosen subdomain. What is the proper way to go about setting up something like this? .htaccess? Have some api for writing virtual hosts? The application would still always map to one directory on my sever, I just want to give theme a custom URL.