on 18-Mar-2015 14:52
Problem this snippet solves:
On each HTTP request, the iRule replaces the Host header value with the selected pool member IP address and port. Some web servers and web applications require this to serve requests.
Code :
# From: https://devcentral.f5.com/s/wiki/iRules.http_request_send.ashx when HTTP_REQUEST_SEND { # Need to force the host header replacement and HTTP:: commands into the clientside context # as the HTTP_REQUEST_SEND event is in the serverside context clientside { # Replace the HTTP host header with the selected server IP and port HTTP::header replace Host "[LB::server addr]:[LB::server port]" } }