Jump to content

Login to administration using domain instead of IP not working


Recommended Posts

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

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

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

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

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

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

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

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

×
×
  • Create New...