Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

Matthew_Ross_71's avatar
Matthew_Ross_71
Icon for Nimbostratus rankNimbostratus
20 years ago

Capture 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