Forum Discussion
iRule assistance
Looks like this iRule you require. condition sequence can be changed based on the preference.
when HTTP_REQUEST { if { !([class match [HTTP::uri] contains api_string])} { discard log local0. "connection DISCARDED from [IP::client_addr]" } elseif { [HTTP::path] starts_with "/resources/" } { pool pool_atldevngn } else { pool pool_atlapipool1 } }
I think you’re totally right (should of had my coffee).
In an if/elseif/else branch only the first matching conditional statement that is true will be executed.
If it was an if/if branch that’s where all branches get executed.
Have you had a chance to test the iRule to see if it works as expected?
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