Forum Discussion

rodrigo_Benzaqu's avatar
rodrigo_Benzaqu
Icon for Nimbostratus rankNimbostratus
Jun 06, 2007

Check my sintaxis on the rule ??

Hello, Can I use "??" on the rules ?

 

 

Is this rule ok ?

 

Thanks man.

 

 

 

rule RULE_MPAGO {

 

when HTTP_REQUEST {

 

switch -glob [HTTP::uri] {

 

"/m??/*" -

 

"/mp-*"

 

 

{

 

pool POOL_MPAGO }

 

 

"/cgi-bin*"

 

{

 

pool POOL_MPAGO_8088 }

 

 

"*/ml/*" {

 

pool POOL_SQL }

 

 

default {

 

pool POOL_STATIC

 

}

 

}
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    You probably need to have the opening "{" for each body on the same line as the conditions, and the "" are not required, but otherwise looks like it would work:
    rule RULE_MPAGO {
    when HTTP_REQUEST {
      switch -glob [HTTP::uri] {
        /m??/*    -
        /mp-*     {
          pool POOL_MPAGO
        }
        /cgi-bin* {
          pool POOL_MPAGO_8088
        }
        */ml/*    {
          pool POOL_SQL
        }
        default   {
          pool POOL_STATIC
        }
      }
    }
    }

    HTH

    /deb