iRules fail in v14.1.2.3
I recently upgraded from v12.x to v14.1.2.3 and simple redirect/rewrite iRules seem to fail. At first I removed the iRule, deleted it and just recreated it and this worked for a bit (2nd rule below)! However, it suddenly fails and I cannot tell why this would happen. I have seen a number of similar threads but nothing really answers the issues.
I have one irule that contains:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"support1.xyz.com" {
# port 7080
log local0.
pool SupportPool
}
"support2.xyz.com" {
# port 7080
log local0.
pool SupportPool
}
}
}
And another that contains:
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"support2.xyz.com" {
if { [HTTP::uri] equals "/" } { HTTP::redirect "/portal/ss/?guest=0"}
}
"support1.xyz.com" {
switch -glob [string tolower [HTTP::uri]] {
"/" { HTTP::redirect "/portal/ss" }
"/support" { HTTP::redirect "/portal" }
"/downloads" { HTTP::redirect "https://ftpdl.xyz.com" }
}
}
}
}
I've read maybe these are now in conflict with how v14.x looks at iRules? Regardless, this worked flawlessly up until now. I cannot make sense of it as the syntax is correct! Now if any of the URIs are typed it returns a PR_CONNECT_RESET_ERROR error in browser as if the pool or iRule doesn't exist. Is there a new way to express this or new syntax?