Forum Discussion
bayuwindu_24616
Nimbostratus
Jan 25, 2016Need Help for irule configuration to change Http Responses / uri
I have an interactive web application that using some services ports. F5 will be used as a proxy, But after doing configuration not all application function work fine. shortly, I think I need irule ...
Kai_Wilke
MVP
Jan 26, 2016Hi Bayuwindu,
I guess you're talking about the "Location" header that is used for 301/302/307 HTTP redirects, isn't it?
To change those values you could use an HTTP_RESPONSE iRule in combination with the [HTTP::header] and [string map] command to tweak the redirect to your internal server names.
The required code would look like this...
when HTTP_RESPONSE {
if { [HTTP::header exist Location] } then {
HTTP::header replace Location [string map { "http://web.test.com:2000" "https://web.test.com" } [HTTP::header value Location]]
}
}
Cheers, Kai
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