Forum Discussion
Mark_S__182830
Jan 15, 2015Nimbostratus
Adding Catchall Behavior to iRule
With the following iRule, when I hit domain.com/ShortName1_Anything here, it will keep the URI portion intact and pass it to the default pool for the VIP. if { [HTTP::uri] eq "/ShortName1*" } {...
Chris_Wentland
Jan 15, 2015Nimbostratus
You could have also switched the operator from equals to starts_with, eliminate the * from the matching string, and end the if/elseif with an else statement to set the default action. The switch command is a more efficient way to do the same thing, and uses the * in the URI match to equivocate it to the starts_with operator.
- Mark_S__182830Jan 15, 2015NimbostratusThanks Chris! I'm learning a lot as I run into issues :)
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