Forum Discussion

Balasubramaniy2's avatar
Balasubramaniy2
Icon for Nimbostratus rankNimbostratus
Aug 29, 2018

Customer Error pages for 400,403,408,500,502,503,504 errors

Hi,

 

F5 need to respond the custom error page (html file) while getting following response from back-end servers.

 

Kindly share procedure, how to achieve this.

 

2 Replies

  • Something like below, you can club few status code with OR operator too if to combine,

     

    when HTTP_RESPONSE {
         if { [HTTP::status] == "400" } {
             HTTP::respond 200 content "..."
         }
         elseif { [HTTP::status] == "403" } {
             HTTP::respond 200 content "..."
         }
         elseif { [HTTP::status] == "408" } {
             HTTP::respond 200 content "..."
         }
         elseif { [HTTP::status] == "500" } {
             HTTP::respond 200 content "..."
         }
         elseif { [HTTP::status] == "502" } {
             HTTP::respond 200 content "..."
         }
         elseif { [HTTP::status] == "503" } {
             HTTP::respond 200 content "..."
         }
         elseif { [HTTP::status] == "504" } {
             HTTP::respond 200 content "..."
         }
    }