Forum Discussion
stephon_87914
May 12, 2011Nimbostratus
HTTP::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
Wou...
The_Bhattman
May 12, 2011Nimbostratus
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
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