Page 1 of 1

redirect www to non www?

Posted: Tue May 29, 2012 2:14 am
by hellogoodbye
Hello,

How do I redirect www to non www? The add to cart function seems to stop working?

Re: redirect www to non www?

Posted: Tue May 29, 2012 4:05 am
by bigchili
add a rewrite rule in your .htaccess file.

Just Google "how to redirect from www to non www" and you will find what you need to add to the .htaccess.

Re: redirect www to non www?

Posted: Fri Oct 12, 2012 4:33 am
by ebeing
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]

Re: redirect www to non www?

Posted: Wed Nov 07, 2012 9:34 pm
by steppen321
The question was how to redirect "www to non www" not the vice versa.

But I think everybody can guess how to alter the code posted above ;)

Re: redirect www to non www?

Posted: Wed Nov 07, 2012 9:53 pm
by Calcite
What is the reasoning behind using this?

Re: redirect www to non www?

Posted: Thu Nov 08, 2012 4:23 pm
by steppen321
SEO - Search Engine Optimization

For Google

http://domain.com
and
http://www.domain.com

are 2 separeate URL's.

So if you are not using the technique described above, you have the same content on to different URL's.

It's not terrible, but for SEO purposes it's better to consolidate your content on 1 URL.