Magento – Magento 2, too many redirects. All browsers, frontend and backend

magento2redirectssl

I've scoured through numerous threads on this subject and tried everything that was pertinent to my situation to no avail.

I have SSL enabled. Everything was working fine until I edited one of the base_url's via command line. However upon changing it back I now get the redirects error and have been battling with it for an entire day now.

Here are my core_config_value web values.

      1  | default |        0 | web/unsecure/base_url         | http://www.newmillsoutlet.co.uk/
      59 | default |        0 | web/default/cms_home_page     | home                            
     123 | default |        0 | web/unsecure/base_static_url  | NULL                              
     124 | default |        0 | web/unsecure/base_media_url   | NULL                             
     125 | default |        0 | web/secure/base_url           | https://www.newmillsoutlet.co.uk/ 
     126 | default |        0 | web/secure/base_static_url    | NULL                              
     127 | default |        0 | web/secure/base_media_url     | NULL                              
     128 | default |        0 | web/cookie/cookie_path        | NULL                              
     129 | default |        0 | web/cookie/cookie_domain      | https://www.newmillsoutlet.co.uk/ 
     130 | default |        0 | web/cookie/cookie_httponly    | 1                                 
     426 | default |        0 | web/unsecure/base_link_url    | https://www.newmillsoutlet.co.uk/ 
     427 | default |        0 | web/secure/base_link_url      | https://www.newmillsoutlet.co.uk/ 
     428 | default |        0 | web/secure/use_in_frontend    | 1                                 
     429 | default |        0 | web/cookie/cookie_restriction | 0                                 
     487 | default |        0 | web/secure/use_in_adminhtml   | 1           

I've cleared all the cache folders, restarted apache2. But nothing seems to make any difference. I just get the redirects error consistently.

Also using http://www.redirect-checker.org/ I can see that without the www. I get a 200 OK yet if I use www it is throwing the too many redirects error.

Does anyone know what might be causing this?

Thanks

* UPDATE 1 *

The frontend now loads fine, no issues there. My problem now is that I cannot access the backend/admin page. It gives the following error after throwing an exception:

Front Controller Reached 100 Router Match Iterations.

Again I've had a good look through SE for any information but cannot find anything which relates to me exact issue.

Best Answer

Insert in your core_config_data tabel below data and check after clearing cache and cookie

INSERT INTO core_config_data ( scope, scope_id, path, value) VALUES ( 'default', 0, 'web/seo/use_rewrites', '1')

you can do this by admin marketing->url rewrite option but your admin currently not working So insert manually and check.

       array('config_id' => '3','scope' => 'default','scope_id' => '0','path' =>'web/unsecure/base_url','value' => 'http://www.newmillsoutlet.co.uk/'),
    array('config_id' => '4','scope' => 'default','scope_id' => '0','path' => 'web/secure/base_url','value' => 'http://www.newmillsoutlet.co.uk/'),
    array('config_id' => '240','scope' => 'default','scope_id' => '0','path' => 'web/url/use_store','value' => '1'),
    array('config_id' => '241','scope' => 'default','scope_id' => '0','path' => 'web/url/redirect_to_base','value' => '1'),
    array('config_id' => '242','scope' => 'default','scope_id' => '0','path' => 'web/seo/use_rewrites','value' => '1'),
    array('config_id' => '243','scope' => 'default','scope_id' => '0','path' => 'web/unsecure/base_link_url','value' => '{{unsecure_base_url}}'),
    array('config_id' => '244','scope' => 'default','scope_id' => '0','path' => 'web/unsecure/base_skin_url','value' => '{{unsecure_base_url}}skin/'),
    array('config_id' => '245','scope' => 'default','scope_id' => '0','path' => 'web/unsecure/base_media_url','value' => '{{unsecure_base_url}}/media/'),
    array('config_id' => '246','scope' => 'default','scope_id' => '0','path' => 'web/unsecure/base_js_url','value' => '{{unsecure_base_url}}js/'),
    array('config_id' => '247','scope' => 'default','scope_id' => '0','path' => 'web/secure/base_link_url','value' => '{{secure_base_url}}'),
    array('config_id' => '248','scope' => 'default','scope_id' => '0','path' => 'web/secure/base_skin_url','value' => '{{secure_base_url}}skin/'),
    array('config_id' => '249','scope' => 'default','scope_id' => '0','path' => 'web/secure/base_media_url','value' => '{{secure_base_url}}/media/'),
    array('config_id' => '250','scope' => 'default','scope_id' => '0','path' => 'web/secure/base_js_url','value' => '{{secure_base_url}}js/'),
    array('config_id' => '251','scope' => 'default','scope_id' => '0','path' => 'web/secure/use_in_frontend','value' => '0'),
    array('config_id' => '252','scope' => 'default','scope_id' => '0','path' => 'web/secure/use_in_adminhtml','value' => '0'),
    array('config_id' => '253','scope' => 'default','scope_id' => '0','path' => 'web/secure/offloader_header','value' => 'SSL_OFFLOADED'),
    array('config_id' => '254','scope' => 'default','scope_id' => '0','path' => 'web/default/front','value' => 'cms'),
    array('config_id' => '255','scope' => 'default','scope_id' => '0','path' => 'web/default/cms_home_page','value' => 'home'),
    array('config_id' => '256','scope' => 'default','scope_id' => '0','path' => 'web/default/no_route','value' => 'cms/index/noRoute'),
    array('config_id' => '257','scope' => 'default','scope_id' => '0','path' => 'web/default/cms_no_route','value' => 'no-route'),
    array('config_id' => '258','scope' => 'default','scope_id' => '0','path' => 'web/default/cms_no_cookies','value' => 'enable-cookies'),
    array('config_id' => '259','scope' => 'default','scope_id' => '0','path' => 'web/default/show_cms_breadcrumbs','value' => '1'),
    array('config_id' => '260','scope' => 'default','scope_id' => '0','path' => 'web/polls/poll_check_by_ip','value' => '0'),
    array('config_id' => '261','scope' => 'default','scope_id' => '0','path' => 'web/cookie/cookie_lifetime','value' => '36000000'),
    array('config_id' => '262','scope' => 'default','scope_id' => '0','path' => 'web/cookie/cookie_path','value' => NULL),
    array('config_id' => '263','scope' => 'default','scope_id' => '0','path' => 'web/cookie/cookie_domain','value' => NULL),
    array('config_id' => '264','scope' => 'default','scope_id' => '0','path' => 'web/cookie/cookie_httponly','value' => '1'),
    array('config_id' => '265','scope' => 'default','scope_id' => '0','path' => 'web/session/use_remote_addr','value' => '0'),
    array('config_id' => '266','scope' => 'default','scope_id' => '0','path' => 'web/session/use_http_via','value' => '0'),
    array('config_id' => '267','scope' => 'default','scope_id' => '0','path' => 'web/session/use_http_x_forwarded_for','value' => '0'),
    array('config_id' => '268','scope' => 'default','scope_id' => '0','path' => 'web/session/use_http_user_agent','value' => '0'),
    array('config_id' => '269','scope' => 'default','scope_id' => '0','path' => 'web/session/use_frontend_sid','value' => '0'),
    array('config_id' => '270','scope' => 'default','scope_id' => '0','path' => 'web/browser_capabilities/cookies','value' => '1'),
    array('config_id' => '271','scope' => 'default','scope_id' => '0','path' => 'web/browser_capabilities/javascript','value' => '1'),
    array('config_id' => '1334','scope' => 'default','scope_id' => '0','path' => 'web/cookie/cookie_restriction','value' => '0')
Related Topic