Forum Discussion
Joe_Erchul_4263
Nimbostratus
Aug 11, 2017Need to grab variable data from HTTP::Location, then append that to the HTTP::Location
Gang,
I have an opportunity to solve yet another crapplication issue. The owners of a website need to have variable information read from their HTTP::Location header, then extracted and appende...
Stanislas_Piro2
Cumulonimbus
Aug 11, 2017Hi,
you can try this code:
when HTTP_RESPONSE {
if { [HTTP::is_redirect] && [string tolower [HTTP::header Location]] contains "www.def.com" } {
set redirect_uri [URI::decode [URI::query [HTTP::uri] redirect_uri]]
scan $redirect_uri {http://www.def.com/%[^/]/} locale
HTTP::header replace Location "[HTTP::header value Location]&locale=$locale"
}
}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
