Forum Discussion

Otto_Schmedlap_'s avatar
Otto_Schmedlap_
Icon for Nimbostratus rankNimbostratus
Jun 14, 2006

How to match URI of <nothing>

What do I need to use in my iRule to match on the URI being nothing (ie: http://domain.com/ , or http://domain.com )?

 

 

Also is there any benefit to use event of HTTP_REQUEST vs HTTP_REQUEST_DATA?

 

 

Thank you

1 Reply

  • The URI will never be an empty string. For an empty uri (http://domain.com or http://domain.com/) the value of the HTTP::uri is "/".

    when HTTP_REQUEST {
      if { [HTTP::uri] equals "/" } {
        log local0. "Empty URI requested"
      }
    }

    As for the two events. The HTTP_REQUEST event is raised when the BIG-IP processes the HTTP Request from the client. The payload may or may not be available at that time. The HTTP_REQUEST_DATA event is raised upon calling the HTTP::collect method from within the HTTP_REQUEST event and the BIG-IP subsequently receives the payload data.

    -Joe