I have been searching the internet trying to find a solution to this problem but cannot find a definite solution.
I am trying to redirect rewrite
anything.domain.com/anypage.php?sub=anything&including=get_parameters
to
domain.com/users/anypage.php?sub=anything&including=get_parameters
I have found several pages with possible solutions but they all differ slightly to my needs, and editing them continually ends in failure.
Any help would be much appreciated. Thank you.
P.S Wildcard DNS are enabled and everything is set up correctly in apache.
Edit:
I ended up using the folowing, it seems to work pretty well. Thanks.
RewriteCond %{HTTP_HOST}
^(.*).domain.com RewriteCond
%{HTTP_HOST} !^www.domain.com [NC]
RewriteRule ^(.*)$
http://domain.com/users/$1?sub=%1 [P]