webing
05-16-2008, 03:20 PM
Hi, i'm trying to force www.example.com using the .htaccess file but i'm not sure i've done it correctly:
i'm using this code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^.example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
well i created the .htaccess file and it's a html file, i put the code at the top so:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^.example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
<html>
<head>
so on so on
when i refresh my website i get this:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@hidden.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8g DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at hidden.com Port 80
Any solutions please?
sorry for asking so many questions :(.
i'm using this code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^.example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
well i created the .htaccess file and it's a html file, i put the code at the top so:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^.example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
<html>
<head>
so on so on
when i refresh my website i get this:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@hidden.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8g DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at hidden.com Port 80
Any solutions please?
sorry for asking so many questions :(.