HTTP:Host modification
I wish to have clients connect to a server with one URL and get feedback on the same URL. However, the host element in the URL would have been modified between the LTM and the server. For example
Client ==> https://abcdef.lion.com:1234/$uri ==> LTM ==> https:/abc.lion.com:1234/$uri / ==> Server
Server ==> https://abc.lion.com:1234/$uri ==> LTM ==> https:/abcdef.lion.com:1234/$uri / ==> Client
In all this manipulation of the host element, the URI remains the same.
This action is required because the server application is programmed to respond to only requests that come with the host name abc.lion.com. However, I do not want the user to launch the URL https://abc.lion.com:1234/$uri as it would conflict with production.
The objective is to test the backup system without impacting production.
I have tried using irule but it does not fully achieve the objective. Find below sample irule used
when HTTP_REQUEST { if { not ([string tolower [getfield [HTTP::host] : 1]] contains "def") } { HTTP::redirect https://abc.lion.com:1234[HTTP::uri] } }
when HTTP_RESPONSE { HTTP::redirect https://abcdef.lion.com:1234[uri::path] }