1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

ErrorDocument on external url without redirection

Discussion in 'Apache' started by Ricardas, Apr 20, 2017.

  1. #1
    Hi,

    I have apache 2.2.22 acting as proxy. My goal is to do this configuration. When the backend server is unreachable, overloaded etc (5xx error), I want to serve the error page not from localhost, but from another server. The goal is to keep requested url unchanged and serve error pages with correct status codes (client browser should not to see any redirect). The another server which serves error pages, has php and it returns these pages with correct status code.

    The problem is this. When using full url with ErrorDocument directive, apache actually does redirection:
    ErrorDocument 502 some_full_url

    RewriteRule gives the possibility to keep the origin url and display the page from external url.
    But how to combine these two methods?

    Thanks in advance.
     
    Ricardas, Apr 20, 2017 IP