Forum Moderators: phranque
I am pretty new to htaccess and mod rewrite and have a quandary I can't figure out.
I am trying to rewrite a domain to mysite/forums. I have read the info in the thread below and added it to my htaccess file. But as soon as I upload it my site reverts to a 500 error.
Can anyone help? I have rewrites working in a subdirectory of my site so I can't see why this doesn't work at root, unless there is some conflict between the php bit and the rewrite!?
Thanks for your help!
[webmasterworld.com...]
My .htaccess looks like this:
AddHandler application/x-httpd-php .php .html
AddHandler server-parsed .html .shtml
AddType 'text/html; charset=ISO-8859-1' html
RewriteEngine On
rewriteCond %{HTTP_HOST} ^www\.mydomainname2\.co.uk
rewriteCond %{REQUEST_URI}!/forums/
rewriteRule (.*) /forums/$1 [L]
rewriteCond %{HTTP_HOST} ^mydomainname2\.co.uk
rewriteCond %{REQUEST_URI}!/forums/
rewriteRule (.*) /forums/$1 [L]
AddType 'text/html; charset=ISO-8859-1' html
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?mydomainname2\.co.uk
RewriteCond %{REQUEST_URI} !/forums/
RewriteRule (.*) /forums/$1 [L]