Forum Discussion
Ankur_Goel_2526
Nimbostratus
Apr 07, 2019Need i-rule to allow traffic for specifc URI
Need irule to pass traffic to pool member if HTTP request comes for . But if URI value is different with above URL then traffic should block and user should receive Error - 404. Also, if pool members are down then user should receive Error - 505.
Appreciate if there is quick response.
Thanks,
- Hamish
Cirrocumulus
Untested (But syntactically correct), try this...
when HTTP_REQUEST { if { not ([HTTP::uri] equals "/net") } { log local0.debug "[HTTP::uri] is not permitted to site" HTTP::respond 404 } }
- Lee_Sutcliffe
Nacreous
Give this one a try
when HTTP_REQUEST { if {[active_members myPool] > 0} { if {!([HTTP::uri] equals "/abc")} { HTTP::respond 404 content "my 404 error message" } } else { myPool has no active members HTTP::respond 505 content "my 505 error message" } }
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