Forum Moderators: phranque
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
would it be better to use Redirect or does the R=301 cover that?
I want the non-www version to drop out of the search engines altogether if possible.
[edited by: engine at 1:17 pm (utc) on Mar. 31, 2005]
[edit reason] examplified [/edit]
mod rewrite i am using is little different than what you have.
RewriteEngine On
RewriteCond %{HTTP_HOST}!^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
[edited by: engine at 1:17 pm (utc) on Mar. 31, 2005]
[edit reason] examplified [/edit]