So is the second log statement not being reached? Since you only included the first log statement in your response I'm assuming the one in the enclosed if statement is not being reached. Is that a correct assumption. I have no clue on why a simple string comparison would not work.
I would recommend using log statements in all logic paths.
when HTTP_REQUEST {
log local0. "Checking URI '[HTTP::uri]' from [IP::client_addr] for insecure calls to some server"
if { [string tolower [HTTP::uri]] equals "/fooserver/foo"} {
log local0. "Request for '[HTTP::uri]' from [IP::client_addr] is being sent to the other site"
HTTP::redirect "https://redirect.somedomain.net"
} else {
log local0. "Request for '[HTTP::uri]' from [IP::client_addr] is being allowed"
}
}
An alternate approach you could try would be something like this:
when HTTP_REQUEST {
log local0. "Checking URI '[HTTP::uri]' from [IP::client_addr] for insecure calls to some server"
switch [string tolower [HTTP::uri]] {
"/fooserver/foo" {
log local0. "Request for '[HTTP::uri]' from [IP::client_addr] is being sent to the other site"
HTTP::redirect "https://redirect.somedomain.net"
}
default {
log local0. "Request for '[HTTP::uri]' from [IP::client_addr] is being allowed"
}
}
}
The only thing I can think of if the equals operator isn't succeeding is that the original string has a space in it or something to make the equals not succeed. That's why I've included quotes in the log statement to help rule that out.
If it is actually getting to the HTTP::redirect command and that isn't in fact issuing a redirect to the client, then that's a product issue that you'll have to take up with product support.
Run one of these rules through and pass along the full log output and well see where we stand.
-Joe