I want to add this code to an already existing .htaccess file to make all non-www URLs to go to their www version to protect against duplicate content issues with Google:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST}!
^www..
RewriteRule ^(.*)$
[L,R=301]
<IfModule>
The exisiting .htaccess file has about 50 lines of permanent redirects like so:
Redirect permanent /BeingPresent.html [url]http://www.domain.org/folder/file.html
How do I add the mod rewrite to the .htaccess file safely and correctly? I tried just adding it and it gave me an error message.
Also, this is for a .org domain so I would assume this line would change to:
^www..
Is that correct?
Thanks so much in advance!