Redirect loop explanation

2

I'm going to a meeting and they're going to ask why some data has a Redirect Loop. In the code, I put a false parameter and it has solved, but it turns and moves it back. The question is: What is a redirection loop? What I want is just an explanation, a theory on the subject and nothing more. It is not code of how to avoid, it is what is even in theory.

    
asked by anonymous 13.02.2015 / 18:12

1 answer

5

Redirect loop is when the following situation occurs:

Let A, B and C be any pages.

  • When accessing A, it redirects to B.
  • when accessing B, it redirects to C.
  • When accessing C, it redirects to A.
  • Note that you have formed an infinite looping of redirects. The browser, smarty, identifies this case, and generates an error message instead of making requests until the user interferes with the process.

    Another error that may occur is the error "Too Many Redirects", which means there have been many redirects. Some browsers (Chrome if I'm not mistaken) count when sequential redirects occur and stop them at the moment the quantity exceeds a value.

        
    13.02.2015 / 18:19