Anush
Aug 11, 2016Nimbostratus
TCL errors
we have following irule configured and it's throwing large amount of TCL errors evenif logging is disable for the irule. It's working ok and in production but not sure why it cause TCL errors
...
Hi,
you can check if the data group exists before searching in it:
when HTTP_REQUEST {
Redirect request to the matching data_group value
if {[class exists VURL_[string tolower [HTTP::host]]]} {
set redirect_url [class match -value [string tolower [HTTP::uri]] equals VURL_[string tolower [HTTP::host]]]
log local0. "Redirecting: [HTTP::host][string tolower [HTTP::uri]] to $redirect_url "
HTTP::redirect $redirect_url
}
}
}