fenixrob Posted March 13, 2015 Share Posted March 13, 2015 In Prestashop 1.6. Im having this problem, I had my shop name for quite some time now like this: planetpet.sk , shop name and ssl. But Im trying to redirect all non www traffic to www, I read a lot of tutorials, on how to do it. When I added this into the .htaccess, it crashed, internal server error: (I put it before the prestashop comment line) <IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{HTTP_HOST} !^www\.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</IfModule> So I tried to redirect the traffic by changing the shop name in the BO from planetpet.sk to www.planetpet.sk. Every page works fine now, it gets redirected correctly, but when I try to add a item to cart it fails. I get ajax popup asking me if I want to continue shopping or go to checkout , and when I click Go to checkout, my cart is empty. Can somebody please help me solve this issue? another thing - when I had the www in my shop name, I tried to clear cache, disable/enable friendly URL, nothing helped. Pls help guys I just want my website to redirect non www to www, but I cant get it to work. Link to comment Share on other sites More sharing options...
Rolige Posted March 13, 2015 Share Posted March 13, 2015 Don't change this parameter directly in the .htaccess, you need add www in BO > Localization > SEO & URL Link to comment Share on other sites More sharing options...
fenixrob Posted March 14, 2015 Author Share Posted March 14, 2015 Thank for your reply, I deleteted the code I added to htacces, so now there is just the www.shopname in BO, but it still doesnt work. The cart gets empty or I cant login as a customer, no error gets reported, the page just reloads and nothing happens. I think thats a problem witch some old cookies, because when I deleted cookies from my browser It worked. But I cant tell every customer to manualy delete browser cookies, I want to do it for every customer. I tried the clear smarty cache and force compile, and clear cache in the BO , but nothing helped. Link to comment Share on other sites More sharing options...
Rolige Posted March 14, 2015 Share Posted March 14, 2015 (edited) If problem is cookies o cache there is not more options, this info is stored in the customer computer (at least you enable force compile), anyway, if most of your visitors are new you will not have problem because doesn't exists cookies/cache yet. Edited March 14, 2015 by COTOKO (see edit history) 1 Link to comment Share on other sites More sharing options...
fenixrob Posted March 14, 2015 Author Share Posted March 14, 2015 Yes you´re right, when browsing through my browsers cookies, I found som old cookies that were generated by my shop without the www, and new cookies generated with www. The old cookies expire in two days and then I will test the website. If it works, I will mark this as solved. So it seems I just have to wait, and I thought if I edit the frontend cookies to expire in e.g. 1 hour, that thay will solve the problem, but the problem was, that they didnt rewrite the old non-www generated cookies. Link to comment Share on other sites More sharing options...
selectshop.at Posted March 15, 2015 Share Posted March 15, 2015 link to your page please ? Did you already refreshed the cart module on your back-office -> modules ?= Or dinstall and install again and verify if problem disappeared. If not. Please name the URL of your page. Link to comment Share on other sites More sharing options...
fenixrob Posted March 16, 2015 Author Share Posted March 16, 2015 planetpet.sk Yep, its definitely an old cookie problem, Im gonna mark this as solved. 1 Link to comment Share on other sites More sharing options...
moy2010 Posted March 17, 2015 Share Posted March 17, 2015 Consider also to point Googla Analytics to your "www" website . Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now