Forum Discussion
Jaybo
Aug 10, 2017Nimbostratus
iRule to re-write headers & responses in both directions
hi all, hoping someone can point me in the right direction as this is hopefully a simple request.
i need to fully mask an intranet site as a totally different URL to avoid rolling out hosts file...
Yann_Desmarest
Aug 10, 2017Cirrus
Hi,
You can bind a stream profile to your Virtual Server. It will allow you to rewrite content.
K7027: Replacing multiple strings using a Stream profile
The stream profile rewrite body but not headers. To rewrite a Redirect response, you should use an irule to rewrite the value of the Location header by using the string map command :
when HTTP_RESPONSE {
set new_uri [string map {http https} [HTTP::header “Location”]]
HTTP::header replace Location $new_uri
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects