Maintenance page redirection based on URI match?
Hi,
New to iRules and new to LTM 11.5. We've recently upgraded from 11.3 to 11.5. Traffic redirection to a maintenance page based on a URI match (i.e. https://services.customer.com/service/svcpage*) that used to be accomplished with HTTP traffic classes are now replaced with an iRule using iFiles. Problem is that the rule appears to crash the entire service ( whenever we apply it to the virtual server ("connection was reset with the server" error).
Here's the basic iRule. The virtual server has other iRules that operate it when in normal production and this one is at the top of the order when applied for server maintenance:
when HTTP_REQUEST {
if { [HTTP::uri] eq "/logo.gif" } {
HTTP::respond 200 content [ifile get logo.gif]
} elseif { [HTTP::host] contains "services" and [HTTP::uri] contains "svcpage*" } {
HTTP::respond 200 content [ifile get Maintenance-page-web]
} else { discard }
}
The iFile changes sometimes so that clients can go elsewhere on the site via links set up on the page and we have to re-import the file, but we almost always replace what is there. Since the customer doesn't have a test environment that can reliably test this, we're left with troubleshooting under fire of a maintenance event with the customer shaking their collective heads every time. No logs show a problem and I still suspect this deceptively simple rule to be the culprit. Can anyone suggest what's going wrong or ways to debug?