Forum Discussion
Tom_92690
Nimbostratus
Jul 09, 2009URL Rewrite
Hi,
We want to have a VIP A to accept traffic on port 80 and listen to http://www.xyz.com. Then the http request needs to be rewrited depending on the node that will process the traffic...
hoolio
Cirrostratus
Jul 09, 2009Hi Tom,
You can use something like this to rewrite the host header based on the selected pool member:
when HTTP_REQUEST_SEND {
Force evaluation in the clientside context
clientside {
Check the requested pool member
switch [IP::server_addr] {
1.1.1.1 {
HTTP::header replace Host "www.abc.com"
}
default {
HTTP::header replace Host "www.def.com"
}
}
}
}
Aaron
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
