Redirecting subdomains
I would like to have subdomains redirected.A manual gave me this info:
RewriteMap lowercase int:tolower
RewriteEngine on
RewriteCond ${lowercase:%{HTTP_******} !^$
RewriteCond ${lowercase:%{HTTP_******} !^www\.hf-online\.com$
RewriteCond ${lowercase:%{HTTP_******} ^(www\.|)([^.]+)\.hf-online\.com$
RewriteRule ^(.+) ${lowercase:%{HTTP_******}$1 [C]
RewriteRule ^(www\.|)([^.]+)\.hf-online\.com(.*) /users/$2$3 [L]
RewriteCond ${lowercase:%{HTTP_******} ^(www\.|)[^.]+\.[^.]+\.hf-online\.com$
RewriteRule ^(.+) ${lowercase:%{HTTP_******}$1 [C]
RewriteRule ^(www\.|)([^.]+)\.([^.]+)\.hf-online\.com(.*) /users/$3/$2$4 [L]
My domain is www.grizzlyhost.com
www.username.grizzlyhost.com and username.grizzlyhost.com should be redirected to www.grizzlyhost.com/username
The path to my HTML root dir is /home/htdocs/grizzlyhost/www/ and the userfiles are in /home/htdocs/grizzlyhost/www/username/
I changed the code and uploaded the .htaccess file, but it was returning 500 errors on EVERY page I requested
Could somebody fix this code? I'm a n00b at Unix/Apache.
TIA, GRIZZLY