I want to redirect only if there is an error (server status 503). Without the error, this is the redirect script, which works fine:
Redirect /abc https://www.abc.com/pqr.html
Redirect /cde https://www.cde.com/pqr.html
But, this redirects /abc to https:// http://www.abc.com/pqr.html in all cases. I want this redirect only in case of an error. This syntax:
ErrorDocument 503 https://www.abc.com/pqr.html
redirects all urls with 503 error message to https:// http://www.abc.com/pqr.html. But, I want the /cde ones with 503 error messages to be redirected to https:// http://www.cde.com/pqr.html
Any clues on how to do it?
This perfectly works for me. Got this answer in Apache Forums: