Forum Discussion
Mario_Eury_6049
Nimbostratus
Oct 02, 2006CASE instead of nested if/then
I am relatively new with using IRULES. However, I would like to know if there any way to use CASES instead of nested if/then statements within a rule? I have a pretty big rule to write to direct traffic between one pool/server to the other based on a host's ip address/network segment.
something like this:
myirule{
when client_accepted {
if {[ip::addr [ip::remote_addr] equal 192.168.100.1/24] }{
pool firstpool
} else {
pool secondpool
}
}
- Colin_Walker_12Historic F5 AccountI think what you're looking for is the switch command. You can read more about it here: Click here
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