Forum Discussion

schoekek's avatar
schoekek
Icon for Nimbostratus rankNimbostratus
Nov 12, 2019

Big IP AWS Edition

I would like rewrite the Host Header with pendency of pool Member.

I try the following:

when LB_SELECTED {

  if { [LB::server addr] contains "194.76.212"} {
      HTTP::header replace "Host" "ff.geobasis.de"
  #log local0. "Node FF: [LB::server addr]"
  }
  if { [LB::server addr] contains "194.76.232"} {
      HTTP::header replace "Host" "zit.geobasis.de"
  #log local0. "Node ZIT: [LB::server addr]"
  }

}

It's not worked...

Any idea for solution?

5 Replies

  • Thx for the fast response.

    But i don't found any conditions for matching the Pool Members.

    I must replace the Host header per request in conditon to distributed pool member....

  • My bad, I was see "Forward traffic" in the action chart and I thought it was a conditions matching !

     

     

  • add some logging, does the if { [LB::server addr] contains "194.76.212"} hit or not?

     

    in the example about LB::server they use a little different approach for checking IP

     

    https://clouddocs.f5.com/api/irules/LB__server.html

     

    i would try that for sure.