Forum Discussion
Brent__Smith_28
Jul 26, 2005Historic F5 Account
5XX Error Redirect
I am trying to help out a customer of mine that is trying to help a customer with an iRule that will re-load balance when a 5xx error is returned instead of returning the error to the end user. Has ...
bl0ndie_127134
Jul 29, 2005Historic F5 Account
We have added two new rules that will allow you to do some thing like this on the next release of BigIP. If you have the TrafficShield beta, you should be able to try this out.
when HTTP_REQUEST {
if {[HTTP::method] == GET} {
set request [HTTP::request]
}
}
when HTTP_RESPONSE {
if {[info exists request] && ([HTTP::status] >= 500)}{
set server [LB::server addr]
HTTP::retry $request
}
}
when LB_SELECTED {
if {[info exits server] == 0} {
return
}
if {$server == [LB::server addr]} {
LB::reselect
set server ""
}
}
For the current version of BigIP you will have to write a rule that looks like this.
when HTTP_RESPONSE {
if {[HTTP::status] >= 500} {
HTTP::redirect "www.host.com/try/again/page"
}
}
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