Forum Discussion
stephon_87914
Nimbostratus
May 12, 2011HTTP::redirect causes infinite loop
Hello all,
We have written a iRule in attachment
But we found that results in an infinite loop while doing HTTP::redirect
Other functions (e.g: HTTP::retry) work fine
Would any one please help to resolve this issue?
Thanks a lot.
--
stephon
1 Reply
- The_Bhattman
Nimbostratus
Hi Stephon,
I took a quick look at the code. However, I think you are running into a loop because you are re-processing the redirect back into the iRULE and it's matching a statement that doesn't assume that the client is already being redirected the link.
There are many different ways to stop this loop, however, the one that I think is the easiest is the following untested irule. . . } elseif {!([HTTP::request] eq "http://errorimg.org/noaccess.png") and ($lookup == 2) } { log local0.debug "No cdn [HTTP::host] [HTTP::uri]" HTTP::redirect "http://errorimg.org/noaccess.png" } .' . .
I hope this helps
Bhattman
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects