With a default configuration, TCL errors from iRules will be logged to /var/log/ltm. If you're not seeing an error with TCL in the error text, it's probably not the rule generating the error.
Can you add log statements and reproduce the problem? The log output will be to /var/log/ltm.
when HTTP_REQUEST {
log local0. "Client [IP::client_addr]: requested [HTTP::host][HTTP::uri]"
if { [TCP::local_port] == 80 }{
log local0. "Client [IP::client_addr]: requested via port 80, redirecting to https"
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
} elseif { [HTTP::host] equals "www.xxx.company.com"}{
log local0. "Client [IP::client_addr]: client requested [HTTP::host], updating to zzz.company.com"
HTTP::header replace "Host" "zzz.company.com"
if {not ([HTTP::uri] starts_with "/FOO")}{
switch -glob [HTTP::uri] {
/ -
/images/* -
/bin/* {
log local0. "Client [IP::client_addr]: rewriting URI to /FOO[HTTP::uri]"
HTTP::uri "/FOO[HTTP::uri]"
}
}
}
}
}
Aaron