在我的.htaccess
文件中,我有:
ErrorDocument 404 http://localhost/example/public_html/error/404
但是当发生404错误时,默认页面会显示而不是http://localhost/example/public_html/error/404
。
答案 0 :(得分:1)
尝试修改主机配置并设置
<Directory /path/to/your/directory>
AllowOverride All
</Directory>