Forum Discussion
Adrian_Turcu_10
Nimbostratus
Oct 30, 2007Help With HTTP_RESPONSE
Hello Gurus
Could someone help me with a quick rule to replace a header in the response back to the client, please?
My problem is like follows: we have a poxi app (not proxy) and t...
David_Homoney
Nimbostratus
Oct 30, 2007How about like this.....
when HTTP_REQUEST {
set shost [getfield [HTTP::host] ":" 1]
set smethod [HTTP::HTTP::method]
}
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "3" } {
set rlocation [HTTP::header "Location"]
set rurl [string range $rlocation 0 15]
HTTP::header replace Location $smethod://$shost$ruri
}
}
I believe that this should set $rurl to $rlocation minus the first 16 characters.
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