Jump to content
Quentin Caillaud

[SOLVED] Can't access backoffice (too many redirects)

Recommended Posts

Hi,

My site was on Prestashop Ready but as they're stopping the service I moved it on another hosting (Gandi Simple Hosting). But since I did it I cannot access my back office because of a redirect loop. The Front office seems fine, even if it is useless as the site is on maintenance stage.

It was accessible on fresh install, before I imported the data from my Prestashop ready hosting, so I don't think it comes from my hosting (but I still asked help on their side too)

I've exported the data from prestashop ready, I changed PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL and ps_shop_url in the database dump before importing it.

I changed COOKIE_IV, NEW_COOKIE_KEY, COOKIE_KEY and SECRET in parameters.

I tried :

  • to disable (temporarily) https, on hosting side and prestahop side
  • to remove .htaccess on project root
  • to disable link rewritting
  • to disable apache multiview

And of course clearing cache (browser, application and even varnish) before each try.

I'm out of leads to what to do next to access my back office. Any idea ?

Share this post


Link to post
Share on other sites

you said "I changed PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL and ps_shop_url in the database dump "

if you prepended any of the domain names with http(s) that can result in to many redirects, it should be domain name only

Share this post


Link to post
Share on other sites

Lol indeed...

It would be convenient and easy for me to put the blame on my hosting, or Prestashop, but the fact that it also do not work locally seems to point on error coming from me... I must have forgot to configure something.

(when I said I asked my hosting for help too, I didn't said it was prior to this post, it's in parallel. They are helping me right now)

Share this post


Link to post
Share on other sites

gotcha, well there are other possibilities with some mis-config of course....but ps out of the box, with above fields set properly is pretty robust...and we do loads and loads of dev copies, prod copies...without issue.....so much easier for most experienced community members to solve with hands on, now we must just best guess and if nothing else hold hands...it takes a village.

if you get really stuck, message me and we take a look at it for free...

Share this post


Link to post
Share on other sites

Tanks a lot for the proposition, I don't know if it helps but here are my local server logs :
 

[Fri Mar 13 11:18:30 2020] 127.0.0.1:55226 [302]: GET /backoffice
[Fri Mar 13 11:18:30 2020] 127.0.0.1:55226 Closing
[Fri Mar 13 11:18:30 2020] 127.0.0.1:55238 Accepted
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55238 [302]: GET /backoffice/index.php?controller=AdminLogin&token=04d4595f1417292fa37ceba2fe487b18
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55238 Closing
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55246 Accepted
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55246 [302]: GET /backoffice/index.php?controller=AdminLogin&token=04d4595f1417292fa37ceba2fe487b18
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55246 Closing
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55254 Accepted
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55254 [302]: GET /backoffice/index.php?controller=AdminLogin&token=04d4595f1417292fa37ceba2fe487b18
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55254 Closing
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55262 Accepted
[Fri Mar 13 11:18:31 2020] 127.0.0.1:55262 [302]: GET /backoffice/index.php?controller=AdminLogin&token=04d4595f1417292fa37ceba2fe487b18

And it goes on and on until the "too many redirects" error. In this example the https is disabled.

Share this post


Link to post
Share on other sites

what is in your apache error log?  that appears to be https log

Share this post


Link to post
Share on other sites

OMG I'm such a dumb f***er...

When copying my data from old site I did a

mv modules ~/dev/presta/modules/

You see that little "/" at the end of my command, I had moved my old module folder inside my new one, instead of replacing it. So my modules were in /modules/modules, not in /modules.

I feel sooooo dumb.

 

Well, still thanks for your help !

Share this post


Link to post
Share on other sites
13 hours ago, Quentin Caillaud said:

OMG I'm such a dumb f***er...

When copying my data from old site I did a


mv modules ~/dev/presta/modules/

You see that little "/" at the end of my command, I had moved my old module folder inside my new one, instead of replacing it. So my modules were in /modules/modules, not in /modules.

I feel sooooo dumb.

 

Well, still thanks for your help !

this is perfect example of having a 'robust' hosting control panel.  We highly recommend Plesk over Cpanel....then you have the tools build in where you are not using barbaric tools, ssh/putty etc.  I'ts not you it's your control panel lol.  

Share this post


Link to post
Share on other sites

also now check all your group owner/permissions, many a smart person who use command level copied, domain creation etc had made big messes.  cheers

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More