Forum Discussion
Russ_Pasley
Nimbostratus
Aug 11, 2015Maintenance 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*...
Stanislas_Piro2
Cumulonimbus
Aug 11, 2015this irule execute HTTP::respond command.
if one of following irule execute a command modifying the HTTP context like HTTP::header insert, it will raise a TCL error and generate a connection reset.
that's why I proposed to disable HTTP_REQUEST event...
the irule should be:
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 }
event disable
}
when HTTP_RESPONSE {
to enable HTTP_REQUEST Event for following requests
event HTTP_REQUEST enable
}
I remove the wildcard in the second statement.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects