Forum Discussion

Nicolas_JIMENEZ's avatar
Nicolas_JIMENEZ
Icon for Nimbostratus rankNimbostratus
Oct 02, 2018

replace http response code of fallback host reply

Hi guys,

 

would there be a way to replace the response code (302 by default) by another one when the sorry page is triggered and fallback host is configured within the http profile?

 

Thanks

 

  • You cannot do this from an HTTP profile but would be able to do so using a Local Traffic Policy or an iRule.

     

  • Hi Nicolas,

    You can replace the Fallback Host feature using LB_FAILED event within an irule :

    when LB_FAILED {
        HTTP::respond 302 observer Location "http://www.example.com/maintenance.page" Connection Close
    }
    

    That's an example, you can customize the HTTP respond to fit your needs.

    Regards

    Yann