Forum Discussion
Anthony_Cheng_1
Nimbostratus
Aug 30, 2015irule to append for HTTP::header value Location
I am trying to append some parameters to a HTTP redirect; to my surprise when I tried to display the new value I see that the resulting value has a different string values attached to it. So it is a...
VernonWells
Employee
Aug 30, 2015The method for changing a header value is:
HTTP::replace
as in:
when HTTP_RESPONSE {
if { [HTTP::is_redirect] && [string tolower [HTTP::header Location]] contains "example.com" } {
HTTP::header replace Location "[HTTP::header value Location]&stuff=1"
log local0. "New Location header value: [HTTP::header value Location] "
}
}
Notice that the
HTTP::header replace operation is not placed in the substitution operators ([...]) because you require not return value from that operation.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