This is for a situation when :
Customer has implemented a solution on a Cisco ACE LB, which receives requests from the internet for https://website1.com/path, and proxies these to https://website2.com/path
When the server replies with 301/302 redirects. These come back from the server with a location field of https://website2.com/path2 and this is sent to the client browser unchecked.
This cause issues for the customer. As the next request comes with https://website2.com/path2
using the below commands will fix the issue.
header rewrite response host header-value "(.*)https://website2\.com(.*)" replace "%1https://website1.com%2"
You should modify the location header if it is 301/302.
Something like below:
header rewrite response location header-value https://website2[.]com(.*)" replace "%1https://website1.com%2"
i followed your instructions. but it does not work at my installation, since i allways get an rewrite to the url, but not a repsonse to access a new URL at the client.