문제

Is there any way to disable the Error 310 (Redirect Loop) checking or is there any browser (can be old) that does not have this checking feature?

I need it for a php script i wrote that checks a file with file_get_contents, and it know what file it is by an id i pass to it, then it redirects to the same page with a different id.

Thanks!

도움이 되었습니까?

해결책

Instead of using header("Location: ...");, try this:

die('<script type="text/javascript">location.href = "'.$new_location.'";</script>');

This will circumvent the redirect loop error.

EDIT: Even better:

die('Some progress information here...
     <script type="text/javascript">
          setTimeout(function() {location.href = "'.$new_location.'"},50);
     </script>');

This way you can display some progress information.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top