Forum Discussion
Kevin_Stewart
Apr 22, 2013Employee
So you're saying, "if the requested path contains the string '/myword' and the client IP is NOT 127.0.0.01, then send a 'URL Blocked' message". Is this your intention?
As a quick test, please modify your iRule as follows and report the results:
when HTTP_REQUEST {
log local0. "Path = [string tolower [HTTP::path]]"
log local0. "Client IP = [IP::client_addr]"
if { [IP::addr [IP::client_addr] equals 127.0.0.01/32] } { log local0. "Local client IP" }
if { ( [string tolower [HTTP::path]] contains "/myword " ) and not ( [IP::addr [IP::client_addr] equals 127.0.0.01/32] ) } {
log local0. "dropped"
HTTP::respond 200 content "URL Blocked"
}
}