Forum Moderators: phranque
RewriteEngine On
RewriteCond %{HTTP_host}!^www\.domain\.com$
RewriteRule ^(.*)$ [domain.com...] [R=permanent,L]
When using the server header checker I still get a 200 code returned
Options +FollowSymLinks -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ [domain.com...] [R=permanent,L]
redirect permanent / [domain.com...]
and got this...
Server Response: [domain.com...]
Status: HTTP/1.1 301 Moved Permanently
Date: Sun, 19 Mar 2006 17:28:02 GMT
Server: Apache
Location: [domain.com...]
Something to do with how my server is configured?
I assume this will still do the job of making sure that a certain SE does not see the non www as dupe content?
If your mod_rewrite code isn't working (it should), then contact your host -- something is amiss with your server.
Jim
Options +FollowSymLinks is required to enable mod_rewrite. If it is not already done in the server configuration, you have to do it in .htaccess. Otherwise, mod_rewrite directives will be ignored.
Mystery over.
Jim