Forum Discussion

kj07208_118528's avatar
Feb 18, 2014

Creating a custom error page for APM

For some vendors that we are implementing SAML with would like for use to provide an error page url. The SAML SP would redirect us back to this error page with an error code on the query string. I need to add a new page and I don't see any options under customization advanced. Is hosted content another option?

 

2 Replies

  • Can you elaborate a bit more on app flow? Are you referring to APM as an IdP asserting for a set of SAML-based apps?

     

  • 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).