Hi guys,

For some reason, I recently decided to set up 301 redirects on all of my domains so that traffic to the non-www. versions goes to the www. versions.

I searched around for the best code to use in .htaccess, and the results were all slightly different, but this is what I settled on:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]

...more rewrite rules...
It seems to work OK, but are there any potential problems with this setup? I want to be really picky/exact about the use of ! and ^ and so on. I'd like to get it straight before applying it across all of my domains!

What do you guys do? Thanks for any help.