Forum Discussion
Parveez_70209
Nimbostratus
May 31, 2014Kindly Guide How to add Error 500 alongwith Existing Error 503 into the Irule
Hi Team,
Kindly Guide How to add Error 500 alongwith Existing Error 503 into the below Irule and also to remove the Set-Cookie BIGipServervs_http part, I tried but I failed as its showing syntax...
JG
Cumulonimbus
Jun 02, 2014How about this, based on your current version:
Don't send 503 or 500 errors out, try next server.
After 10 consecutive failed attempts, send redirect
when HTTP_REQUEST priority 700 {
set my_url [HTTP::host][HTTP::uri]
}
when HTTP_RESPONSE priority 700 {
if { ( ( [HTTP::status] == 503 ) or ( [HTTP::status] == 500 ) ) && ( $count < 15 ) } {
incr count
HTTP::respond 302 Location "http://$my_url"
event disable
} elseif { ( ( [HTTP::status] == 503 ) or ( [HTTP::status] == 500 ) ) && ( $count == 15 ) } {
set count 0
log local0. "Sending to Main Page"
HTTP::respond 302 Location "http://www.lenovo.com"
event disable
}
}
when HTTP_RESPONSE priority 800 {
if { ( ( [HTTP::status] == 500 ) or ( [HTTP::status] == 500 ) ) && ( $count < 15 ) } {
incr count
HTTP::respond 302 Location "http://$my_url"
event disable
} elseif { ( ( [HTTP::status] == 500 ) or ( [HTTP::status] == 503 ) ) && ( $count == 15 ) } {
set count 0
log local0. "Sending to Main Page"
HTTP::respond 302 Location "http://www.lenovo.com"
event disable
}
}
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