Forum Discussion
Maintenance Page URI issue
I have an irule thats working as expected when the pool is down and does throw the maintenance page exactly how i expected. But when the URI is added the irule fails to load at all
{works} {fails}
Does anyone have any clue as to why its not working?
Code
when LB_FAILED {
switch [HTTP::uri] {
"/error.css" {
HTTP::respond 200 content [ifile get "error"] "Content-Type" "text/css"
return
}
"/logo.png" {
HTTP::respond 200 content [ifile get "logo"] "Content-Type" "image/png"
return
}
}
HTTP::respond 200 content [ifile get "maint"] "Content-Type" "text/html"
}
- crodriguezRet. Employee
When you say, "the iRule fails to load at all," can you elaborate, please? Are you getting no response at all from the iRule? Have you checked /var/log/ltm to see if there are any run-time errors when adding a URI? The basic iRule logic seems OK and, in a brief test (sending a hard-coded text response rather than an iFile) works. Are there any other profiles, iRules, or local traffic policies attached to the virtual server that may be operating first? Any upstream firewall-type obstacles that may not be allowing the traffic to even reach the virtual server? (Check statistics to see if the virtual server is receiving the traffic when using ) You could add some log statements to the iRule to see which path it's taking through the logic.
Recent Discussions
Related Content
* 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