Forum Discussion
hooleylist
Cirrostratus
Dec 07, 2009It would be more efficient to only check for the Location header on redirects. Also, if you want to preserve the URI in the redirect, you should use string map:
when HTTP_RESPONSE {
if { [HTTP::is_redirect] and [HTTP::header Location] starts_with "http://newsite.apa.org:443"} {
log local0. "Location [HTTP::header Location]"
HTTP::header replace Location "[string map "http://newsite.apa.org:443 http://newsite.apa.org" [HTTP::header Location]]"
}
}
Aaron