Ahhh, I see now.
So what I'd recommend is looking at moving the HTTP::respond line directly into the active members check, rather than performing a redirect first (going off the CodeShare entry you linked).
With the HTTP::respond command you can respond with whatever content you want (much like in the iRule you linked to in the codeshare) without having to redirect.
So basically, if it's viable, put the contents of your maintenance page in your iRule (or in a class that your iRule can reference) then respond with that instead of redirecting.
Like so:
If the all members in the default pool are down, redirect to the maintenance page
if { [active_members [LB::server pool]] < 1 } {
HTTP::respond 200 content [lindex $::maint_index_html_class 0] "Content-Type" "text/html"
}
}
You could add any refresh you want there, or the user could continue to hit refresh as desired, and it should work just fine. This would basically do away with the "/" and "/index cases in the switch.
Does that make sense?
Colin