Too many redirects

别说谁变了你拦得住时间么 提交于 2019-12-05 19:50:35

The browser is stopping you from hammering the server with a bunch of requests. This is most likely due to the header() sending you to a page which in turn sends you to the same page (or page with the same header()).

This is happening most likely because you are being redirected to the same logout page. I would try setting the location differently.

Happened to me when i was redirecting back to the same page with the same parameters which would cause in infinite loop of requests to the same page by the browser if the browser would not stop on the second iteration and give this error.

Best bet - debug your code and see if you are reentering the page with the same query strings/post params ...

The problem could lie in the page that you are forwarding to rather than the page you are forwarding from This happened to me when the page I was forwarding to (home.php) from a page forwardingPage.php failed an authentication check.

Format on the receiving home.php page was

if authentication check passes...do this else if authentication check fails use header function to forward back to the same forwardingPage.php

The authentication check was failing every time so the page got forwarded and then back to itself. I fixed the authentication check and problem solved

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!