The server redirect to the fallback on 404 and not to the 404 page within the archive.
- To Do
It would appear that we cannot use ErrorDocument Apache directives in a <Location> context. To manually do this, we could have to define a hard-coded path for each language and version combination. Clearly this doesn't work well over time!
As an alternative, I suggest that we use .htaccess files. I enabled the FileInfo override for this path in Apache, so you should be able to drop an .htaccess file in the document root for each language with the line:
- ErrorDocument 404 /manual/<lang>/<version>/404.html
Where <lang> and <version> are replaced accordingly.
Part of the problem with custom error documents is that we also share a virtual host with the Python API, so it quickly becomes a problem to use a generic 404.html page. No doubt, it would confuse a user accessing a non-existent PyDoc URL, only to have an English 404 page show up. Also, what about other languages?
On a side note, Apache does have the ability to display MultiViews. Perhaps this could be useful?