Forum Discussion
HTTP::header replace Host and HTTP:redirect
1:if there are rule1 and rule2 under one VS,order is rule1 and rule2
rule1:
when HTTP:request {
if { [HTTP::host] euqals "www.srwd18.com"} {
HTTP::redirect "http://www.baidu.com"
}
}
rule2
when HTTP::request {
if {[HTTP::host] equals "www.srwd18.com"} {
HTTP::redirect "http://www.google.com"
}
}
so if someone visit www.srwd18.com,client will go to www.google.com 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 "www.baidu.com" to rewrite the request
it seems this will not change the item in broswer,such as IE
so bigip will visit www.baidu.com for client,right?like a proxy
when HTTP::REQUEST {
if {[HTTP::host] equals "www.srwd18.com"}{
HTTP::header replace Host "www.baidu.com"
return}
}
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,
- nitassEmployee
- Robert_47833AltostratusHi,nitass
- nitassEmployeeso if someone visit www.srwd18.com,client will go to www.google.com or where?
- Robert_47833AltostratusHi,
- nitassEmployeecan u try to add pool or node command in the irule to send traffic to another site?
- nitassEmployee[root@tulip:Active] config b virtual bar list
- Robert_47833AltostratusHi,
- nitassEmployee--but pool is in another datacenter,how can I add them in this datacenter?
- Robert_47833AltostratusOK,nitass,I will try this now
- Robert_47833Altostratusand there are 2 FTP VS,how to redirect them?
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com