Forum Discussion

C_Kim's avatar
C_Kim
Icon for Nimbostratus rankNimbostratus
Jun 15, 2017

Some URI bypass iRule.

I have a simple iRule that checks the User-Agent string in the HTTP header and matches against a data group list. The purpose is to block web crawlers from crawling our websites.

when HTTP_REQUEST {
    if {[class match [HTTP::header "User-Agent"] contains "list_of_crawlers"]} {
     only enable log local0. for troubleshooting
    log local0. "[HTTP::host] [HTTP::uri] connection dropped from [IP::client_addr]"
    reject
  return
  }
 }

This iRule works when going to the main URL, i.e .

However, if I start with or (APM), it seems to bypass the iRule and display the page (in help.html) or error (when accessing my.policy).

Granted, these are F5 elements (files in hosted content or APM), but I would expect the rule to still work.

Is that by design?

4 Replies