Forum Discussion
lunitic_56137
Nimbostratus
Jan 29, 2013Appending content to dynamic variables a uri
Ok, I asked this before but I never received a solution for it. I have a web/app server that is returning dynamic uri variables and I need to append that.
For example:
Request comes...
Kevin_Stewart
Employee
Jan 29, 2013While not a big advocate of regular expressions, the following may work for you. The idea, as I understand it, is to capture a 302 redirect with "&Product=" at the END of the Location header URI, and then add "&login=true".
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
if { [regexp {.*&[Pp]roduct=\d+$} [HTTP::header Location]] == 1 } {
HTTP::header replace Location "[HTTP::header Location]&login=true"
}
}
}
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