forwarding requests to APM based on URI.

Folks, We are trying to forwarding requests to APM based on URI. If the F5 sees something like /support and /helpdesk in the URI it should forward the http request to the APM engine. If not, simply forward it to the pool.

Thanks!! N.

Hi Guy,

Use this iRule :

when HTTP_REQUEST {
        Check the requested HTTP uri
       switch -glob [string tolower [HTTP::uri]] {
              "/support*" -
              "/helpdesk*" {
                      Disable APM for these uri
                     ACCESS::disable
              }
              default {
                      Enable APM for all other uris
                     ACCESS::enable
              }
       }
}

Hope it helps

Please mark it as answer if it works

Regards

BIG-IP APM Operations Guide for more info on clientless mode

Examples

when HTTP_REQUEST {

# Check the requested HTTP path

switch -glob [string tolower [HTTP::path]] {

“/apm_uri1*” -

“/apm_uri2*” -

“/apm_uri3*” {

# Enable APM for these paths

ACCESS::enable

}

default {

# Disable APM for all other paths

ACCESS::disable

}

}

}

Thanks, we tried the above to disable the pre-defined access policy APM for  a few URLs:

but it keeps asking the credential again and again, it can not pass the login. any idea? thanks

By default if you put an access profile on a vip, it suppresses all of the HTTP_REQUEST events until after the session is started.

You can turn that suppression off using this irule command:

The reasoning about why it’s like this is so that admins can re-use “non APM” irules on an APM virtual and have them work without modification.