Apidude
Sep 13, 2022Nimbostratus
iRule required to redirect URL to same URL but different port
I am looking for an iRule for this scenario:
A VIP handles traffic to multiple host fields on the same IP address. This is always mapped to the same server pool. Based on the requested host field in the HTTP GET, the F5 LTM needs to change the port from 8080 to either 81 or 80 or 8081.
For example:
if the requested host is test.com:8080 then it should be sent to test.com:80
If the requested host is abc.com:8080 then it should be sent to abc.com:81
Etc.
Could any of you kind souls provide an example for how to do this?