http::status 404 will NOT process http::respond 200
I have this iRule to check for 404s from the servers and reply to client with some simple html maint page. However, when a user requests a page that is not on the server, they just get the standard "IE cannot display the webpage". tcpdumps on internal BIGIP vlan show the server returning the 404. tcpdump on external bigip VLAN shows the client get, an ack from BIGIP to client but no response with either the 404 or the html in my irule. If I remove the iRule and attempt the same url with bad page request, the client gets standard 404 from server. For some reason BIGIP is not doing anything after evaluating for the status code 404. I've also tried doing an http::redirect to another site instead of http::respond and still nothing is returned by BIGIP. What am I missing>
See iRule code below:
when HTTP_RESPONSE {
if { [HTTP::status] == 404 } {
HTTP::respond 200 content "
Website
Site is Currently Unavailable
Site is experiencing a planned/unplanned outage, which is causing disruption for many users. We apologize for the inconvenience and are working to restore service. Please check back to receive the latest update.
"
}
}