Forum Discussion
VernonWells
Nov 19, 2015Employee
Regardless 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".