Forum Discussion
jokragly
Nov 03, 2010Nimbostratus
iRule for URI ACL
Good afternoon. We are getting desperate trying to find a solution to allow specific URIs and deny all other traffic.
Basically what we are after is to allow access to 5 specific directorie...
jokragly
Nov 08, 2010Nimbostratus
Ok, we finally got it work the way we wanted.
We had to make it an and because of the negative logic we were working with.
when HTTP_REQUEST {
if {![class match [string tolower [HTTP::uri]] starts_with SplunkTest] and [HTTP::uri] ne "/" } {
HTTP::respond 200 content "TEST PERMISSION DENIED TO: [HTTP::uri] "
}
}
Once we figured out the solution we changed the logic to make it easier to a positive with the following
when HTTP_REQUEST {
if {[class match [string tolower [HTTP::uri]] starts_with SplunkTest] or [HTTP::uri] eq "/" }{
return
} else {
HTTP::respond 200 content "TEST 13 PERMISSION DENIED TO: [HTTP::uri] "
}
}
All is now functioning correctly and the site loads at speeds that are normal.
Thanks again for everyones help. DevCentral is so very valuable to the F5 solutions.
Jeff
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