Forum Discussion
Robert_47833
Aug 08, 2011Altostratus
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 www.cjj.com
However ,they can be dif...
nitass
Aug 09, 2011Employee
2:sorry for my bad understanding,you mean
when HTTP_REQUEST {
if { [HTTP::header host] eq "www.cjj.com" } {
HTTP::header replace Host "www2.cjj.com"
nod xxxip xxport }
} is not good?
yes, Bhattman means it will add latency to client since traffic has to travel to site1 first and then site2. if u use HTTP::redirect, cilent will connect to site2 directly but uri in his browser will also be changed.
when HTTP_RESPONSE {
if { [HTTP::is_redirect] }{
HTTP::header replace Location [string map {"A.internal.com" "X.external.com"} [HTTP::header Location]]
}
} is a method to change the location when there is a redirect
yes
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