Forum Discussion
Mate_132781
Cirrostratus
Nov 18, 2015Change HTTP host to selected pool member IP address
Hi,
I have BIG-IP LTM 11.6 HF6 with public IP address and two WEB servers with private IP addresses in pool.
Problem is that WEB server expects it's private IP address in host field in HTTP head...
VernonWells
Employee
Nov 19, 2015Regardless of the route domain id, the syntax is the same, namely:
HTTP::header replace Host [getfield [IP::server_addr] "%" 1]
getfield divides the text stream into a series of field delimited by the identified character (%, in this case), and returns the field identified by number. So the "1", in this case, means "the first field". Since the IP will be something like 10.1.1.1%10, getfield with % will divide this into two fields, namely "10.1.1.1" and "10". You want the first field -- i.e., 10.1.1.1 -- hence the "1".Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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