3

I'm using OpenCart to build my site now, but I got this ERR_TOO_MANY_REDIRECTS message when I logout. A few things are very weird:

  1. after I saw this error page for 1 second, it's redirected to my homepage.

  2. this only happens to Chrome, and I don't see this thing at all on Firefox or Safari.

  3. The same error page asked me Try clearing your cookies, but after I clear my cookies for All Time, I can still see the same thing happening to Chrome.

So basically I'm not quite sure if this is something broken for my site, or it's an issue for Chrome browser.

Any idea how to debug and fix this?

focus.style
  • 5,674
  • 4
  • 18
  • 34
oc2020
  • 31
  • 1

2 Answers2

2

Make sure you have renamed you file htaccess.txt into .htaccess, so redirect should work correct.

Although, if your opencart website is not in the root folder of the domain and have path like www.mysite.com/store - open your .htaccess file, find

RewriteBase /

and rewrite it like

RewriteBase /store/
openCarter
  • 23
  • 1
  • 7
1

For OpenCart 2 and 3

Open catalog/controller/account/logout.php

On line ~20 find

$this->response->redirect($this->url->link('account/logout', '', true));

Replace with

$this->response->redirect($this->url->link('common/home', '', true));

Now it should work. In some cases you will need to clear OCMOD cache.

focus.style
  • 5,674
  • 4
  • 18
  • 34