Forum Discussion

Vikasverma31_13's avatar
Vikasverma31_13
Icon for Nimbostratus rankNimbostratus
Sep 05, 2013

check for http response 404 for every request

Hi

 

I'm new to F5 I have a problem where if my server is not available the https error code is 404, then I need to send customized response to the client in xml.

 

Please help me how to achieve it.

 

Regards, Vikas

 

1 Reply

  • Try this:

     

    when HTTP_RESPONSE {
        if { [HTTP::status] == 404 } {
            HTTP::respond 200 content "..."
        }
    }

    The status code (200) is completely arbitrary here, as is the content.