Apache ErrorDocument with absolute path

佐手、 提交于 2019-12-05 10:39:34

I don't think this can be done directly inside the statement: The ErrorDocument will always have to be relative to the DocumentRoot. According to the docs, the only alternative seems to be specifying an external URL, but that is bad because the wrong response header gets sent (302 instead of 404).

You could try whether anything is possible using an Alias directive or - I'm sure this would work - a symbolic link:

ErrorDocument 404 /symlinked_page.php
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!