Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

Help with iRule HTTP_REQUEST syntax

Hello I try to rewrite this irule, before migrate to 10.2 to 12.x

when HTTP_CLASS_SELECTED {
  if {[HTTP::class] eq "app_class" } {
    pool POOL_1
  }
}
`</pre>

Can you tell me please if it is a correct syntaxe

<pre>`when HTTP_REQUEST {
    set policy [POLICY::names matched]
    if {[POLICY::rules matched $policy] eq "app_class"}{
    pool POOL_1
  }
} 
`</pre>

Or

<pre>`when HTTP_REQUEST {
    if {[llength [POLICY::names matched]] > 0} {
    if {[POLICY::rules matched $policy] eq "app_class"}{
     pool POOL_1
  }
 }
}

To use policy_irule, i need to do something in ASM module ?

Thanks for all

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hi,

you can assign pool in Policy instead of using an irule.

1