Forum Discussion
Kevin_Stewart
Jan 29, 2013Employee
While 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"
}
}
}