For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

fubarSUSHI's avatar
fubarSUSHI
Icon for Altocumulus rankAltocumulus
Jul 16, 2014

iRule Help - matchclass and redirect to HTTPS

I have two examples of an iRule that I am migrating from 10.x to 11.4.1. Respectfully requesting assistance on how to properly format these iRules:

when HTTP_REQUEST {

         Check requested host header (set to lowercase)    
        if { [class match [HTTP::host] equals "Datagroup1" ] } {
                    pool Datagroup1_pool     
           } elseif { [class match [HTTP::host] equals "Datagroup2" ] } {
                    pool Datagroup2_pool 
           }

} and

when HTTP_REQUEST {

         Check requested host header (set to lowercase)    
        if { [class match [HTTP::host] equals "Datagroup3_IIS" ] } {
                    pool Datagroup3_IIS_pool         
           } elseif { [class match [HTTP::host] equals "Datagroup4" ] } {
                    pool Datagroup4_pool          
           }
}

These iRules works on HTTP but when I am trying to force to HTTPS... it is not working. Any assistance is warmly appreciated.

1 Reply

  • Two things:

     

    1. The syntax is technically correct for v10 and v11, though you don't have to put the data group name in double quotes.

       

    2. If the event is triggered at all, then SSL offload has already happened. You of course must apply a client SSL profile to the VIP to offload the client side SSL if you want to be able to process HTTP traffic.