我在共享主机上有这样的结构:
~/above_public_html/public_html/directory_i_want_forbidden
我有~/above_public_html/.htaccess
以下内容:
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
当我导航到一个不存在的文件或文件夹时,我会弹出 404.html,没有问题。
当我导航到存在但具有chmod 700
权限(包括directory_i_want_forbidden
)的子文件夹或文件时,我得到:
Forbidden
You don't have permission to access /directory_i_want_forbidden on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at www.mydomain.com Port 80
为了使ErrorDocument 403 /403.html
工作正确,我需要做什么?