I am trying to setup what exactly are basically profiles on subdomains on the development site. The 'profiles' could be user-produced, i.e. sometimes happens anytime.

In your area, I understand I can not use wildcard host records or anything (running inside a MAMP atmosphere, OS 10.6), and I am unsure how to pull off dynamically creating records. The website operates on a vhost.

The following hurdle obviously may be the production server, the industry Media Temple gs (shared) server. Once more, no clue how to pull off creating these (within the situation from the production server) DNS records instantly.

Any assistance/advice is greatly appreciated!

What you are searching for may be the following:


Produce a "catch-all" A-entry inside your DNS (*.example.com).

Apache configuration:

Add the next for your .htaccess file:

RewriteEngine On

# Extract the username from the subdomain
RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com$ [NC]
RewriteRule ^$ /profile.php?username=%1 [L]


Inside your profile.php you all of a sudden possess the username within the $_GET['username'] variable.