Forum Discussion
Redirect rewrite is not working
The rewrite profile only looks at the HTTP headers. That is to say, if your webserver sends a 302 redirect to http://something, it will rewrite that to be https://something
It doesn't touch the content of the page, only the headers.
To modify the content, you need to use a STREAM profile and irule. For an example, refer to the article here.
Note that if the content being returned from the webserver is gzip compressed, the BigIP will not magically decompress it, alter the content, recompress it, and send it on, so you need to remove or modify the Accept-Encoding header in the request to prevent the webserver using compression, so that the BigIP gets to see it.
Generally speaking, the best solution for this is to fix the webserver, and not use a stream profile at all. Make sure that the webserver returns relative links wherever possible.
So in your example, the best solution would be to update the webserver so that it returns a relative URL, rather than an absolute one.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
