Is there a way to detect infinite HTTP 3xx redirect loops on the server? (Not necessarily the exact moment when the client gives an error, as the number of redirects required for that is client-dependent, but log an error after, say, 10 continuous redirects.)
The redirects come from the application code in a LAMP environment. I can change the code, but don't want to change the URL so adding some sort of counter to it is out of the question. I suppose I could use the session to count the number of redirects and erase that count on each non-redirect request, but that is brittle because the session is shared between several browser windows. Is there another way (such as using some HTTP header which the browser would mirror back)?