Forum Discussion

Gary_Penn_10498's avatar
Gary_Penn_10498
Icon for Nimbostratus rankNimbostratus
Nov 15, 2005

Turning off compression for a particular HTML page

I am completely new to the F5 and have not had time to learn about iRules yet. Support tells me than an issue we're having on our site http://fish.shimano-eu.com is related to compression.

 

 

Rather than turning compression off for the entire Virtual Host is there a way to write an iRule to exclude a section. For instance, excluding just the dealer locator:

 

http://fish.shimano-eu.com/publish/content/fish/seh/nl/en/locate_dealers.html

 

 

Any help would be greatly appreciated.
  • Search the forums for COMPRESS::disable. In your case, you could do something like this:

    when HTTP_REQUEST {
      if { ([HTTP::host] eq "fish.shimano-eu.com") and 
           ([HTTP::uri] eq "/publish/content/fish/seh/nl/en/locate_dealers.html") } {
        COMPRESS::disable
      }
    }

    If you want to disable for all below a certain uri directory, you can use the starts_with operator like this:

    when HTTP_REQUEST {
      if { ([HTTP::host] eq "fish.shimano-eu.com") and 
           ([HTTP::uri] starts_with "/publish/content/fish") } {
        COMPRESS::disable
      }
    }

    In that example all requests starting with "/publish/content/fish" will have compression turned off.

    -Joe
  • I was just nudged by one of our guys to mention that if you are managing multiple uri's, then it might be more optimal to use a string data group combined with the matchclass command as opposed to multiple if/elseif's. If you get into that situation, search for "matchclass" in the forums.

     

     

    -Joe