Redirect non-www to www with a 301 redirect not 302

Hi All…



I had an “SEO-guy” go over my site and a suggestion was made to get rid of the 302 (temp) redirect and make it a 301 (perm) redirect, example with http://domain.com to http://www.domain.com



I cannot find where this is configured and my host told me it was CS-Cart initiating the redirect…



So, hopefully someone can point me in the right direction!



Thanks in advance,

Eddie

in your .htaccess, put:


RewriteCond %{http_host} ^your domain.com [nc]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [r=301,nc]




that will redirect all pages to www

[quote name='moka' timestamp='1318208078' post='123284']

in your .htaccess, put:


RewriteCond %{http_host} ^your domain.com [nc]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [r=301,nc]




that will redirect all pages to www

[/quote]



Great! Thank you!



-Eddie