schmuck
Feb 06, 2013Nimbostratus
iRule to block access to all but certain URIs
Only certain URIs are allowed on a server. I am trying to limit access to only those specific URIs. I have tried unsuccessfully to use the following iRule:
when HTTP_REQUEST {
if { not ([string tolower [HTTP::uri]] starts_with "/uri1") || not ([string tolower [HTTP::uri]] starts_with "/uri2") }{
HTTP::respond 200 content "URL Blocked"
}
}
This works fine if it is only one URI and the "or" is removed. Thoughts?