Forum Moderators: phranque
RewriteEngine On
# Extract the subdomain part of domain.com
RewriteCond %{HTTP_HOST} ^([^\.]+)\.example\.com$ [NC]
# Check that the subdomain part is not www and ftp and mail
RewriteCond %1 !^(www|ftp|mail)$ [NC]
# Redirect all requests to a php script passing as argument the subdomain
RewriteRule ^.*$ http://www.example.com/show.php?username=%1 [R,L]
[edited by: jdMorgan at 3:12 pm (utc) on May 4, 2010]
[edit reason] Please use example.,com. See TOS and Charter. [/edit]