Forum Discussion
Joern_Oltmann
Nimbostratus
Mar 17, 2016Requirement deliver Status Page if a specify URL response with error code 5xx
Hi All,
My BigIP should be deliver the following status page if the URL "/internal_api" response with an error code 5xx.
How can I realize this with an iRule.
Would be great someone can help me....
VernonWells
Employee
Mar 17, 2016Not tested, but this should do the trick:
when HTTP_REQUEST {
set path [HTTP::path]
}
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "5" && $path eq "/internal_api" } {
HTTP::respond 500 "{\"error_type\":\"internal_server_error\"}" Content-Type "application/json"
}
}
Joern_Oltmann
Nimbostratus
Mar 18, 2016Hi Vernon, thanks a lot, I will test it on ou lab and come back if it's work!
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