The location value should be a fully qualified URL, including the protocol. If you add http:// or https:// to the Location value, does it work?
You can add logging to find out what's happening:
when HTTP_RESPONSE {
log local0. "[IP::client_addr]:[TCP::client_port]: response status: [HTTP::status]"
if { [HTTP::status] == 302 } {
log local0. "[IP::client_addr]:[TCP::client_port]: Location: [HTTP::header Location]"
switch [string tolower [HTTP::header Location]] {
"server01" -
"server02" -
"server03" {
HTTP::header replace Location "http://www.site.com"
log local0. "[IP::client_addr]:[TCP::client_port]: found a serverXX value, rewriting to http://www.site.com"
}
}
}
}
Aaron