Forum Discussion
Multiple redirect/respond invocations not allowed
The issue is that you're potentially attempting to invoke multiple redirects in a single flow. I'm going to use my "bucket" analogy here. iRules don't really follow a procedural top-to-bottom code flow, but rather are dependent on network flow. So think of an HTTP_REQUEST event as a bucket. The event is triggered when all of the request headers have been received and are now in the bucket. Within the span of that event, you have the option to manipulate the values in this bucket as desired, and at the end of the event the data is "normalized" and dumped onto the wire. If at the end of the event, you've created multiple redirect invocations, that's a problem, because it can't be rationalized.
So in a round-about way, through an admittedly terrible analogy, the point is that you have to make sure that only one redirect is handled within the event. And you have a few options:
Combine everything into one iRule and use if/switch conditioning to ensure that only one redirect path is taken per request.
Set a variable in the "higher priority" rule and check for it in the lower priority rule(s):
if { not ( [info exists stop] ) } {
... continue processing logic with additional redirects
}
Admittedly a bit kludgy, but should work.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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