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

Sahir_180434's avatar
Sahir_180434
Icon for Nimbostratus rankNimbostratus
Aug 12, 2015

Help converting HTTPClass to Policy rule

Hi,

I am trying to upgrade f5 ltm 10.2.4 to 11.5.3 and I get errors regarding existing httpclass, I am wondering if there is anyone that is expert who can help converting current httpclass config to a policy that serves the same purpose.

here is the configs on 10.2.4

profile httpclass ncast-com {

defaults from httpclass

pool ncast-cynweb-pool

redirect none

hosts {

  regex "(?i)ncast.com"

  "(?i)automotiveexchange.com"

  "(?i)ncast.net"

  "(?i)claim.com"

  "(?i)collisionparts.com"

  "(?i)billing.com"

  "(?i)b-cms.com"

  "(?i)b-csm.com"
`


}
}

profile httpclass gui-redirect {

defaults from httpclass

pool none   

redirect "/vehiclerepair"

hosts {

 regex "(?i)ui-dev1.sinet.ehi.com"

  "(?i)gui-dev2.sinet.ei.com"

  "(?i)gui-dev3.sinet.ei.com"

  "(?i)gui-dev4.sinet.ei.com"

  "(?i)gui-dev5.sinet.ei.com"

}

paths "/"

}

Thanks

1 Reply

  • Hi,

     

    the Policies are a set of rules. each rule replace a HTTP Class

     

    so if both HTTP class are assigned on the same VS, you must create one policy with 2 rules:

     

    • require http
    • actions : forwarding

       

    • Rule 1 :

       

      • condition HTTP-Host host equals (List all URLs).
      • Action forward pool ncast-cynweb-pool
    • Rule 2 :
      • conditions
        • HTTP-Host host equals (List all URLs).
        • path /
      • Action http-reply redirect "/vehiclerepair"

    the default options in condition is to ignore case, which is the same as (?i) in your URLs

     

    Do not split URLs in multiple conditions, the OR operator is used between items of a condition, the AND operator is used between conditions.