I think it’s safer to look for a 302 response code and replace the Location header’s host value if it’s set to the value you want to replace, rather than generating the full response in the example you quoted.
Note: I left log statements in the rule to verify the replacement is being done as expected. The output is written to the /var/log/ltm log file. After you’re done testing the rule, either comment out or delete the log lines.
I didn’t test this completely, so repost here if you have any problems.
If the original 302 redirect sent from the server contains a port, you can just add the original port to the rule in the string to replace. You don’t need to specify the port in the string you are putting in, if it’s 80, as it’s the default port for http.
Thanks ver much The las solutions do not change the location value and do not leave any logs. I look like I am not even starting and incident with the iRule.
This is the only one that has work so far, but only works for one server