Jazzo
09-11-2010, 01:07 AM
I'm trying to set up a subdomain to redirect to a directory. I'm also trying to make it so that it will redirect www. I have this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTP_HOST} subdomain.domain.com
RewriteRule ^(.*)$ directory/$1 [L]
but it's not working. It get a 500 Internal Server error for subdomain.domain.com and www.subdomain.domain.com is not found. Any help is appreciated.
Thanks,
Julian
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTP_HOST} subdomain.domain.com
RewriteRule ^(.*)$ directory/$1 [L]
but it's not working. It get a 500 Internal Server error for subdomain.domain.com and www.subdomain.domain.com is not found. Any help is appreciated.
Thanks,
Julian