Forum Discussion

Peter_Bevington's avatar
Peter_Bevington
Icon for Nimbostratus rankNimbostratus
Feb 14, 2012

Redirection

Not been iRuling for very long

 

I have a requirement to redirect traffic from to

 

 

I don't want to use HTTP::redirect as this will create more traffic and would like to redirect to a pool

 

 

I'm doing the following but am finding that the "new-pool' isn't being used

 

 

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

 

"server1*" {

 

HTTP::header replace Host $spr_site

 

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

 

"/" {

 

HTTP::uri "NEW-URI"

 

}

 

}

 

pool "New-Pool"

 

}

 

}

 

 

Anyone have any help or advice ?

 

 

Thanks

 

1 Reply

  • Hi Peter,

     

     

    Can you add logging to the switch statements to see whether the pool command is being reached?

     

     

    http://devcentral.f5.com/wiki/iRules.log.ashx

     

     

    Aaron