multiple redirect iRules on a VS
We have a single VS that normally uses a iRule that does a redirect for / to /irj/portal/ When there is maintenance on that system, we want to have a redirect to another web server active but currently when we enable the down message iRule we get a connection reset and TCL error. Below are some specifics. Is there an easy way to get both iRules to operate on the single VS for when we do system maintenance. I'd rather not have to remove a iRule and replace it since we use an iControl to enable and disable the down iRule.
Here's the error message:
Mar 12 09:08:02 tmm2 err tmm2[8755]: 01220001:3: TCL error: /Common/Portal_URI_Redirect - Operation not supported. Multiple redirect/respond invocations not allowed (line 1) invoked from within "redirect to "/irj/portal""
And here's the problem:
ltm rule /Common/Portal_URI_Redirect {
when HTTP_REQUEST {
if { [HTTP::uri] equals "/"} {
redirect to "/irj/portal"
}
}
}
ltm rule /Common/Portal_Down_Redirect_OnDemand {
when HTTP_REQUEST {
if { [HTTP::uri] equals "/"} {
redirect to "http://site.com/portal_down/index.html"
}
}
}