Hi Sydneysider!
Can you try nested if as shown from this iRule?
I have't tested it yet though.
when HTTP_REQUEST {
set uri1 /maintenance/cms.aspx
set uri2 /maintenancewcf/namematchingservice.svc
if { not [matchclass [IP::client_addr] equals $::betlive_allowed_ip]} {
if { ([string tolower [HTTP::uri]] contains $uri1) or ([string tolower [HTTP::uri]] contains $uri2)} {
log local0. "Connection is from [IP::client_addr] and URI is [HTTP::uri] and X-Forward-For is [HTTP::header X-Forwarded-For] - this will be discarded"
discard
}
} else {
log local0. "Connection has been established from [HTTP::uri] and [IP::client_addr] - accepted"
}
}
Hope that helps!