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 } }
You're most welcome; that's what this community is here for! :-D
I think there is a conflict with your latest iRule (I may be wrong).
Let's say an HTTP request comes in for: http://www.example.com/resources/
My thinking is that the first if statement will evaluate as true so the F5 will select the pool pool_atldevngn. However, the F5 will not stop there and continue to process the elseif statement which will also evaluate as true (assuming that there is no match against data group api_string). The request will therefore be discarded.
Anyone else agree/ disagree?
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