Forum Discussion
Benjamin_9120
Nimbostratus
Jun 08, 2010Return the custom error page to client
My customer want return the customization error page to client if all server is down that this virtual, and this page need built-in LTM.
How to achieve this feature use irules?
- Michael_Yates
Nimbostratus
You have several different options, I haven't included all of them... You can find more in the CodeShare:when HTTP_RESPONSE { if { [HTTP::status] == "403" } { HTTP::respond 200 Loccation "http://www.customerrorpage.com" } elseif { [HTTP::status] == "404" } { HTTP::respond 200 Loccation "http://www.customerrorpage.com" } }
when HTTP_RESPONSE { if { [HTTP::status] == "403" } { HTTP::redirect "http://www.customerrorpage.com" } elseif { [HTTP::status] == "404" } { HTTP::redirect "http://www.customerrorpage.com" } }
when HTTP_RESPONSE { if { [HTTP::status] == "403" } HTTP::respond 200 content "Forbidden Website Error: Forbidden NOTICE: Website has experienced an error. " } elseif { [HTTP::status] == "404" } { HTTP::respond 200 content "File Not Found Website Error: File Not Found NOTICE: Website has experienced an error. " } }
- Michael_Yates
Nimbostratus
The first two seem to have blown up during the first post:when HTTP_RESPONSE { if { [HTTP::status] == "403" } { HTTP::respond 200 Loccation "http://www.customerrorpage.com" } elseif { [HTTP::status] == "404" } { HTTP::respond 200 Loccation "http://www.customerrorpage.com" } }
when HTTP_RESPONSE { if { [HTTP::status] == "403" } { HTTP::redirect "http://www.customerrorpage.com" } elseif { [HTTP::status] == "404" } { HTTP::redirect "http://www.customerrorpage.com" } }
- Benjamin_9120
Nimbostratus
Thanks for all helps。 But,those error code was returned form web server, all server is down,Who returns the error code at this time? - Rab_101866
Nimbostratus
Are you tring to return an error page when all servers in your pool are down? - Rab_101866
Nimbostratus
- Rab_101866
Nimbostratus
Not sure why the link is not coming out correctly.
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