Forum Discussion
Creating a custom error page for APM
I think the easiest approach might be to use an iRule applied to a VIP and serve up content based on the request. Here's a sample that uses two common techniques:
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::uri] {
"/error1*" {
HTTP::respond 200 content "HTML content goes here"
}
"/error2*" {
HTTP::respond 200 content [ifile get errorpage2]
}
"/images/errorlogo.png" {
HTTP::respond 200 content [ifile get errorlogo] "Content-Type" "image/png"
}
}
}
The first approach just stuffs the HTML into the HTTP::respond, while the second and third allow you to upload an "ifile" object (HTML page, images, etc), and then reference them directly. You might apply this to a separate VIP that just handles these requests, or you could technically apply it to the APM IdP VIP (as the immediate HTTP responses would block APM from engaging).
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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