Forum Discussion
Matthew_Ross_71
Nimbostratus
20 years agoCapture a 4xx or 5xx status code...
All,
I am trying to catch a 404 or 401 or 500 http status code in my BIG-IP. I am having difficulty getting the rule to work. I started by using chapter 5, specifically pages 5-1 through 5-40 or so, to help out.
I found the http_header() function and thought that http_header("status") or http_header("status_code") and even http_header("statuscode") contains "404" would get what I wanted. This does not work.
I looked around some of these posts and saw a HTTP_Request type thing...I did not see this in my book.
I am running 4.5.10 build 84. Here is my current (non-working) rule:
if (http_header("status") == "404") {
redirect to "http://172.30.103.13:50123/customunavail.html"
}
else {
use pool myprodpool
}
3 Replies
No RepliesBe the first to reply
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