Forum Discussion

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

HTTP::header replace Host and HTTP:redirect

Hi,dear irule


1:if there are rule1 and rule2 under one VS,order is rule1 and rule2




when HTTP:request {


if { [HTTP::host] euqals ""} {


HTTP::redirect ""









when HTTP::request {


if {[HTTP::host] equals ""} {


HTTP::redirect ""







so if someone visit,client will go to or where?


how to turn off rule2,I only know return will jump out of the current event in single irule.



2:if I use HTTP::header replace Host "" to rewrite the request


it seems this will not change the item in broswer,such as IE



so bigip will visit for client,right?like a proxy





if {[HTTP::host] equals ""}{


HTTP::header replace Host ""






it doesn't work



overall:What I am trying to achieve is:


there are 2 datacenter, same website ,if I want to forward traffic in site1 to site2 ,how to forward them?


The only way I can think about is HTTP::REDIRECT,but this will change the item/address in client's broswer


so it seems HTTP::header replace Host is a good choice,


Can some one help me?


Thanks in advance,


14 Replies