Forum Discussion
Michael_107360
Cirrus
Feb 11, 2014Overwrite Response Headers with existing pool selection irule
I have an application that direct's traffic to a one of 2 pools and the irule works perfectly
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/ac" {
pool V249.48-P31202
}
"/clie...
Kevin_Stewart
Employee
Feb 11, 2014If you're just looking to replace the redirect URL, add this to your existing iRule (modify as required):
when HTTP_RESPONSE {
if { [HTTP::header exists Location] } {
HTTP::header replace Location [string map {"http://xyz.abc.com:31202" "https://xyz.abc.com"} [HTTP::header Location]]
}
}
If the response event sees a Location header, present in a redirect, it will perform a string replacement of the offending URL.
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
