Ricarditu Posted October 16, 2013 Share Posted October 16, 2013 Hi! I recently moved a Prestashop store to another server. In the previous server it was still in testing so I didn't use any domain, just the IP. For the new store, I updated the domain, the base uri, all the db information in settings.inc.php, the Cookie (key and iv) and RIJNDAEL (key and iv) are the same, checked the ps_configuration for the shop_url and it's ok. The store is working. There's just a small detail, I can login to the administration by using the ip address but not using the domain. Everytime I try using the domain, it doesn't go anywhere. If I switch to IP, it works. What might this be? I tried reading other posts but couldn't find anything... I'm sure it's some small detail I haven't noticed... By the way, what might be the problem when you can open the homepage but if you press any button you get an error message that page is not available? Thanks! Link to comment Share on other sites More sharing options...
PrestaNinja Posted October 17, 2013 Share Posted October 17, 2013 Hello, Might be a redirection problem, try to regenerate .htaccess from back office. Activate SEO friendly URL and save, and see if it works! Link to comment Share on other sites More sharing options...
Ricarditu Posted October 17, 2013 Author Share Posted October 17, 2013 Hi! Thank you for your answer. I did that and all the other pages started to work ok. Unfortunately, the admin issue remains... Everytime I try to login usaing the domain, it refreshs without any error but won't login.I tested using wrong password and I got a message saying the password was wrong, so it can verify it. Any idea? Thanks! Link to comment Share on other sites More sharing options...
PrestaNinja Posted October 17, 2013 Share Posted October 17, 2013 I'm pretty sure, I had this issue before, I'm trying to remember how I did. Do you have SSL activated? Please, Try with and without "www.yourdomain.com/admin" and "yourdomain.com/admin" Link to comment Share on other sites More sharing options...
Ricarditu Posted October 17, 2013 Author Share Posted October 17, 2013 Totally right PrestaNinja! Without the www. it works... Strange... Why doesn't it work with www.? In domain settings, I have the option set to the www. Would it be best not to? I have SSL deactivated. Thanks! Link to comment Share on other sites More sharing options...
PrestaNinja Posted October 17, 2013 Share Posted October 17, 2013 It is because www.domain.com is different from domain.com. In your case, you have to choose whether to use www.domain.com or without "www". You have to make a choice, and update database (all shop url) according to your choice. Then you will have to implement a htaccess redirection from www to non-www or non-www to www. Note: with and without "www" are similar, it is just up to you. As for me I prefer having shorter URl (so no www)! I can help you with htaccess redirection depending on what you choose. Link to comment Share on other sites More sharing options...
Ricarditu Posted October 17, 2013 Author Share Posted October 17, 2013 Ok, I see. I prefer with the "www.", I think for some people, having the "www." before is almost mandatory... Lol! Even if they type without, it forwards to """www.". Great! I really appreciate! I noticed something now... The cart is not working. Yesterday, before trying to solve this domain issues, it was working and now it's not. It updates but when I open it, it says "Empty cart". Do you think it might have something to do with .htaccess domain or some cache data? Link to comment Share on other sites More sharing options...
Ricarditu Posted October 17, 2013 Author Share Posted October 17, 2013 Even registering new users and login to existent account is not working... I've been having some many issues... Yesterday everything was fine, could add product to the cart and checkout, could login to my account, today, after changing the uri, it stopped working! Grrr... Link to comment Share on other sites More sharing options...
PrestaNinja Posted October 17, 2013 Share Posted October 17, 2013 in your .htaccess add this: (change 'yourdomain.com' and it must be placed at the top) RewriteEngine on # handles http redirect non-www to www RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L] # handles https redirect non-www to www RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC] RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R=301,L] Regarding your cart, it might be cache, clear smarty cache and your browser cache. Should be good to go! Link to comment Share on other sites More sharing options...
PrestaNinja Posted October 17, 2013 Share Posted October 17, 2013 Then could you list one by one what value you changed in database? Link to comment Share on other sites More sharing options...
Ricarditu Posted October 17, 2013 Author Share Posted October 17, 2013 Ok, I'll use that code. Thank you! Shall I erase something already there regarding the domains? Sure! Directly in db I didn't change anything, I just checked ps_configuration for the domains and uri and they're correct: www.virtualleds.com and /es. Those were the values I used in the SEO & URL settings for domain, ssl domain and URI. The website is this: www.virtualleds.com/es and /pt. They're two similar stores, one in Portuguese and the other in Spanish (I didn't use multistore because of invoice and taxes issues, legal stuff - because it's linked to an official invoice software). If you check the store, just give it a minutes because there's a bandwidth issue, I'm contacting the server support. Thank you for all your help! Link to comment Share on other sites More sharing options...
PrestaNinja Posted October 17, 2013 Share Posted October 17, 2013 Everything seems to work fine... Added product to cart, no problem. Created an account, no problem... Nop no need to delete anything in .htaccess file. Add these lines directly at the top. Link to comment Share on other sites More sharing options...
Ricarditu Posted October 17, 2013 Author Share Posted October 17, 2013 Ok, already pasted it. Working like a charm! I guess is something to do with cache... I already cleaned smarty cache and browser cache... Still not working in my Chrome browser but working everywhere else: FF, IE, Safari, mobile devices, etc... I tried chrome in a new private window and it works. I think it's all done now! Thank you so much for all your help! PS: By the way, do you know how can I set a cookie to use in the list/grid view for the products? To remember the user choice (list or grid) in everypage. Thanks once again! Super! Link to comment Share on other sites More sharing options...
PrestaNinja Posted October 17, 2013 Share Posted October 17, 2013 You are welcome You need to go to chrome settings to empty cache! As for cookie, it will be more complicated and hard to explain as it work alongside with your theme... (I will PM you) Link to comment Share on other sites More sharing options...
Ricarditu Posted October 17, 2013 Author Share Posted October 17, 2013 I use Click&Clean to do that... Supposingly! Lol! Ok, great! I think I can say this is solved. Link to comment Share on other sites More sharing options...
Recommended Posts