Forum Discussion

kykong_107132's avatar
kykong_107132
Icon for Nimbostratus rankNimbostratus
Mar 16, 2009

redirect base on HTTP header

Hi All,

 

how can i use irule to do redirection base on HTTP header? Basically, if I see HTTP header Cookie exist in HTTP REQEUST header, I will redirect to server 1.

 

 

I build this irule,

 

 

when HTTP_REQUEST {

 

if {[HTTP::header] contains "Cookie"} {

 

pool server1

 

}

 

}

 

 

but this does not work.

 

Appreciate someone can help me.

 

thank in advance.

2 Replies

  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    You can use HTTP::header exists "Cookie" (Click here) to do this. You would also want to select the pool if the HTTP request does not match your criteria. This ensures if multiple HTTP requests are made on the same TCP connection that the correct pool is selected each time.

     

     

    Aaron
  • Hi Aaron,

     

    thank for your help.

     

    it works fine.

     

    Appreciate your help.

     

     

     

    regards,