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

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.