Forum Discussion
Can you nest IF into switch?
You can use if inside switch. Your Irule should work except $::whitelist should be whitelist with the "class match" command.
This is an important excerpt from the "class" command wiki page at: https://devcentral.f5.com/wiki/iRules.class.ashx
Note that you should not use a $:: or :: prefix on the datagroup name when using the class command (or in any datagroup reference on 9.4.4 or later).
In v9.4.4 - 10, using $::datagroup_name will work but demote the virtual server from running on all TMMs. For details, see the CMP compatibility page.
In v11, using $::datagroup_name will result in a TCL runtime error and a reset being sent to the client!
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