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*...
Aug 11, 2015
Hi
Connection reset usually indicates problems with the iRule. Have you checked the ltm log (/var/log/ltm)?
Contains does not support wildcards, perhaps that could be it?
As for troubleshooting this I'd add the rule to the VIP in question but only execute it for a certain IP.
Something like this:
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals 1.1.1.1] } {
log local0. "Executing maintenance iRule"
if { [HTTP::uri] eq "/logo.gif" } {
log local0. "Request for logo.gif, serving it"
HTTP::respond 200 content [ifile get logo.gif]
} elseif { [HTTP::host] contains "services" and [HTTP::uri] contains "svcpage" } {
log local0. "Request matching services or svcpage, serving it"
HTTP::respond 200 content [ifile get Maintenance-page-web]
} else { discard }
}
}
/Patrik
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