I am trying to create a policy to replace the host in the header.
i.e is when users access myaccount.xyz.com F5 need to replace it with myaccount.abc.com and send the response to the server . And when server sends the response F5 should again replace the host to xyz.com and send to client.
I am able to get it working using an irule with wildcard but when it comes to specific url my irule is not working with the response.
when HTTP_REQUEST {
set external_hostname [HTTP::host]
set sub_hostname [substr [HTTP::host] 0 “.xy.com”]
It looks like you may be able to accomplish your goal using a rewrite profile, would be more efficient then an iRule. See the article below and reply back with your thoughts.
I finally got it working with the below irule but trying to add multiple urls in the request and not getting my syntax correct for the http response. Any help appreciate it.