- Code: Select all
RewriteCond %{HTTP_HOST} ([^\.]+).mysite.(.*)
RewriteCond %{HTTP_HOST} !^exclude.mysite.(.*)
RewriteCond %{HTTP_HOST} !^www.mysite.(.*)
RewriteRule ^(.*)$ index.php?u=%1 [L,NC]
This works fine, so http://user.mysite.com goes to www.mysite.com/index.php?u=user
But, subsequent pages all go back to the index.php?u=user, so other page accesses do not work, ie:
http://user.mysite.com/register.php
http://user.mysite.com/index.php?m=module_name
and so on...