<b>You need a host with wildcard subdomains turned on for this to work. Contact your host if this isn't already done, it isn't a hard setting to change.</b>
Options +FollowSymlinks
RewriteEngine On
Options -MultiViews
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9]+)\.yourdomain\.com
RewriteRule (.*) _controller.php?username=%1&module=$1 [L,QSA]Replace yourdomain with your domain name. The subdomain displays what ?username= returns so if you go to example.domain.com it displays _controller.php?username=example - however it doesnt show this, appears as the subdomain still. Going to example.domain.com/hi displays _controller.php?username=example&module=hi. If you bump into any problems, post here and I'll look into it
Enjoy!

Sign In
Register
Help



MultiQuote

