Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • 2khaat Friend
    #139086

    Hi,

    Does anyone know how I would get it to redirect http://site.com to http://www.site.com. The only reason I need to do this is the cart on my site doesn’t seem to work right, you basically have two carts on the site. One if you’re without the www and one with the www. You could put items in the www. and then go the site without the www and you will have an empty cart.

    Thanks for you help

    2khaat Friend
    #295822

    I think I found a solution, to edit my .htaccess file, does this look correct to you guys?

    Redirecting YourSite.com to http://www.YourSite.com

    If search engines find both www and non-www links from other sites to your site, they may treat http://YourSite.com and http://www.YourSite.com as two different websites with the same content. This means that your site can be penalized for duplicate content.

    Many experts recommend to set up a 301 redirect (permanent redirect) from YourSite.com to http://www.YourSite.com

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^YourSite.com [nc]
    RewriteRule (.*) http://www.YourSite.com/$1 [R=301,L]

    Replace “YourSite.com” with your real domain name.

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 1 voice, and was last updated by  2khaat 15 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum