Forum Discussion

Robert_47833's avatar
Robert_47833
Icon for Altostratus rankAltostratus
Sep 29, 2011

can I use switch in this way?

insert switch in to another switch

 

can I use it in this way?

 

 

switch -glob [HTTP::uri] {

 

"/" {

 

switch -glob [string tolower [HTTP::host]] {

 

"*.co.uk" {

 

HTTP::redirect

 

return

 

}

 

default {

 

HTTP::redirect

 

return

 

}

 

}

 

}

 

"/account*" {

 

persist none

 

pool MYX

 

return

 

}

3 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    I'm not aware of any problems nesting switches... Why? Are you having problems? (Sorry waiting for dentist at the moment so dont have access to an LTM to try it out)

     

     

     

    H
  • thanks,Hamish

     

    I didn't mean it is causing problem

     

    I am just wondering whether it will cause issue or not
  • I agree with Hamish and I can confirm that it should not cause any issues (I have numerous nested switch iRules).