Forum Discussion
deantotham_2141
Nimbostratus
Jul 04, 2007two whens?
Is there a way to have two when condition statements in the same iRule.
I.e.
I am happy using this statement for regional IP source redirects
when CLIENT_ACCEPTED { if { [IP:...
Jul 05, 2007
You can have as many event handlers (when statements) in your iRule as you wish.
when HTTP_REQUEST {
do something
}
when HTTP_RESPONSE {
do something
}
In fact, you can have mulitple duplicate events in the same iRule (as long as you specify a different priority for them.)
when HTTP_REQUEST priority 100 {
do something
}
when HTTP_REQUEST priority 200 {
do something else
}
The default priority for an event handler is 500. Valid values are 0 to 1000 and they are processed from lowest to highest.
-Joe
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