6

Recently, i have moved the server of my magento2 project. After moving to different server following steps i have taken.

1) Configured the Base URL in

core_config_data

2) Clear the Magento 2 Cache (Remove all the content inside var directory)

3) Perform php bin/magento indexer:reindex

4) Clear Browser Cookies and cache.

Result

chrome says This webpage has a redirect loop for only admin screen while frontend working fine. I have checked with the other browsers but it has similar message of TOO_MANY_REDIRECTS

Prompt response to this issue will be highly appreciated.

Thanks

1

I know you asked this a while ago, but I see that it is still unanswered.

You did the correct thing to change the Base URL in the core_config_data table. I would make sure to double check that you updated both the secure URL and the base URL.

But the issue seems that the admin login screen is stuck in a redirect loop.

I'd recommend checking the app/etc/env.php file to see what the backend name for the site is set to:

'backend' => 
  array (
    'frontName' => 'admin', //keep your custom url name here
  )

The next place I'd look is at the URL rewrite table to make sure that there isn't a special rule that is redirecting to the older location.

And if this doesn't fix it, then this is likely an .htaccess rule that may be stuck in a loop.

I hope this helps!

  • I have a similar problem, and nothing you write seem to help. The base URL is correct (that's why the frontend opens all right), frontName is "admin", URL rewrite table was truncated, and it is not an .htaccess problem because the redirection headers are fiven by the Magento PHP scripts. – Jānis Elmeris Dec 6 '17 at 12:47
  • OK, the problem in my case was hostname/domain name containing an underscore "_", which is not allowed for hostnames (and filter_var($routePath, FILTER_VALIDATE_URL) returns false). – Jānis Elmeris Dec 6 '17 at 13:08
0

Do not keep '_' in your vhost url.

www.a_bc.co/admin (Won't work)

to

www.abc.co/admin (Will Work)

Magento 2 Admin ERR_TOO_MANY_REDIRECTS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.