Forum Discussion

Cosmo_136119's avatar
Cosmo_136119
Icon for Nimbostratus rankNimbostratus
Oct 23, 2013

iRule example

i am new to F5 iRules I am trying to find an iRule to remove a company name from a site if there are any browser or proxy caching enabled

 

  • Can you elaborate? Where is the company name defined? The host name/URL? An HTTP header? HTTP payload?

     

  • Thank You for replying. from what I was told that this company name would be in the URI. I found the below iRule and want to see if that works when HTTP_REQUEST {

     

    Disable caching if the URI contains the string "xxxx"

    if { ([HTTP::uri] contains "xxxx") } { CACHE::disable } }

     

    Any thoughts?

     

  • That iRule will effectively disable the proxy-based caching (if enabled) for a given URI. Just to be clear though, the URI is the portion of the URL after the host name. Example:

    www.example.com/foo/bar
    

    The HTTP::host command would return "www.example.com" The HTTP::uri command would return "/foo/bar"

    This iRule does not, however, remove the company name from the URI. It simply disables the caching profile.