I thought the same as your host until 3 days ago, to be honest. Then I read
the fine manual which states:
Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a method such as http in front of it), Apache will send a redirect to the client to tell it where to find the document, even if the document ends up being on the same server. This has several implications, the most important being that the client will not receive the original error status code, but instead will receive a redirect status code. This in turn can confuse web robots and other clients which try to determine if a URL is valid using the status code. In addition, if you use a remote URL in an ErrorDocument 401, the client will not know to prompt the user for a password since it will not receive the 401 status code. Therefore, if you use an ErrorDocument 401 directive then it must refer to a local document.
There is a corollary to the last two sentences: if the ErrorDocument 401 does not return an HTTP 401 code Apache will not know to prompt the user for a password. What the documentation doesn't explicitly state is that this also applies to LOCAL DOCUMENTS.
What it also doesn't state is that Apache follow redirects. From the same fine manual:
URLs can begin with a slash (/) for local web-paths (relative to the DocumentRoot), or be a full URL which the client can resolve.
One would think that if a local document (starting with /) is specified then it has to be an existing file or it will simply not be found. Well, reading it more carefully we notice that it says "local web-paths", NOT "local documents". Since it is a web-path, redirects DO apply on it.
Feel free to forward this reply to your host. It may save them a lot of head scratching in similar cases. The wording in Apache's manual is a bit deceiving :(
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!