Forum Discussion
Robert_47833
Aug 07, 2011Altostratus
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
rule1:
when HTTP:request {
if { [HTTP::host] euqals "www.srwd18.com"} {
HTTP::redirect "h...
Robert_47833
Aug 07, 2011Altostratus
Hi,nitass
Thanks for your help
I have tried in my lab,
: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?
------it can't show the page,I don't know why
2:
yes
so bigip will visit www.baidu.com for client,right?like a proxy
no, i don't think so. what bigip does is to replace host header in request to "www.baidu.com".
-----bigip worked as a full proxy server,so after it change replace host to "www.baidu.com",it will send request to "www.baidu.com",however rule below doesn't work
when HTTP::REQUEST {
if {[HTTP::host] equals "www.srwd18.com"}{
HTTP::header replace Host "www.baidu.com"
return}
}
3:
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't it be done by gtm?
-----some downstream dns server ignore the TTL set in GTM.so they cache the record more than TTL ,maybe 24 hours,
that is why I try to achieve via redirect or forward
Do u have some method to achieve this
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects