Forum Discussion

Robert_47833's avatar
Icon for Altostratus rankAltostratus
Aug 08, 2011

questions on HTTP::header replace Host

Hi,dear irule



I have 2 datacenters,due to some operation,we need to forward traffic on site1 to site2


site1 and site2 have the same domain name


However ,they can be different in order to achieve goal of forwarding traffic


like , can change something to achieve this)



for example ,clients visit and hit site1,when bigip receive this traffic ,forward it to site2 and keep the broswer same as before.


how to achieve this?


I searched the irule here,HTTP::header replace Host are used more often than other methods


But I am confused by events below




if { [HTTP::header host] eq "" } {


HTTP::header replace Host "" }







if { [HTTP::header is_redirect]} {


HTTP::header replace Location [string map -nocase {} [HTTP::header value Location]] }





Here is my doubts:



1:why should we use HTTP_RESPONSE to change the location?


2:should I set node xxx under HTTP::header replace Host ""




HTTP::header replace Host ""


node xxxxip xxport


3:what is the process of this command ,after excuting this replace,what is the behavior of bigip to handle traffic(I know http::redirect is bigip send 30x to client and the client send request to new URL )


4:how to achieve this goal :forward traffic which hit site1 to site2 ,can I not need two domain name to achieve this?


Thanks in advance

13 Replies

  • ok,I think this is the only way to achieve this goal even it is too much to do ,need to enable ssl server profile and disable them in some case