Forum Discussion
Kai_Wilke
Nov 27, 2017MVP
Hi theShell0x0,
you may take a look to the iRule below. It uses the
HTTP_REQUEST_SEND
event to enumerate the currently selected pool member and if the pool member IP matches a given criteria it will overwrite the requested HOST-header value to reflect the changed port number...
when HTTP_REQUEST_SEND {
if { [IP::server_addr] eq "1.2.3.4" } then {
clientside {
HTTP::host "vs-hostname:9447"
}
}
}
Note: Depending on the behaviour of your web application, it may be also required to parse the HTTP reponses (e.g. HTTP-Redirects, Links in HTML-Source) to untranslate the internal HOST-header value to reflect the external HOST-header value again.
Cheers, Kai