[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: [users@httpd] configuring a proxy fallback
On Fri, May 18, 2018 at 11:02 PM, John Bazik <john_bazik@xxxxxxxxx> wrote:
>> Doesn't ErrorDocument to a proxied path work? Something like:
>>
>> ProxyErrorOverride on
>> ErrorDocument 404 /internal_404/
>> ProxyPass /internal_404/ http://legacy_site/whatever/
>> ProxyPassReverse /internal_404/ http://legacy_site/whatever/
>
> Wow, thanks! I assumed that "local url" in the docs meant no.
> That works exactly as I want it to.
OK, was just a POC though, you probably need more to avoid infinite
loops and take care of original requests to "/internal_404/".
Possibly something like this (REDIRECT_STATUS being set on
ErrorDocument handling only):
ProxyErrorOverride on
ErrorDocument 404 /internal_404/
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^/internal_404/ http://legacy-site/whatever/ [P]
Eventually saving the original path somewhere for "whatever" before,
if it matters, with setenvif or another rewriterule.
You get the picture...
Regards,
Yann.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx