Forum Discussion
Nath
Cirrostratus
May 02, 2017Modifying http uri response
Hi All, is there any iRules where I can modify the http uri response of the server going to client?
The scenario is this, every time the server respond to http request the server includes its ho...
Jad_Tabbara__J1
Cirrostratus
May 03, 2017Based on what I understand, you need to replace the "Location" response header.
In this case please try following irule without the need to add any "Stream" Profile.
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
if { [HTTP::header Location] contains "/server1" } {
log local0. "Location value before replace : [HTTP::header value Location]"
HTTP::header replace Location [ string map -nocase { "/server1" "" } [HTTP::header value Location] ]
log local0. "Location value after replace : [HTTP::header value Location]"
}
}
}
You can check the /var/log/ltm to check if it is working well.
Also replace "/server1" by the name of your backend server.
Regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
