Hi,
I've recently bought a better version of a domain I was using.
Old version: www.exampl.com
New version: www.example.com
Now I've set up an .htaccess file to 301 Old version to New version and at the same time forward the non-www to www. However, the .htaccess file looks a mess. Have I don it correctly?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^exampl.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} www.exampl.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]