假设我有这个目录结构:
带有[ErrorDocuments规范]的
-
.htaccess
-
fo1
-
ed [带有ErrorDocuments的文件夹]
-
ed401.html
-
fo2 [公共网站的文件夹]
-
.htaccess
-
.htpasswd
主.htaccess包含
ErrorDocument 401 /www/htdocs/path/to/fo1/ed/ed401.html
公共访问.htaccess包含
AuthUserFile /www/htdocs/path/to/fo2/.htpasswd
AuthGroupFile /dev/null
AuthName 'Bitte Zugangsdaten eingeben'
AuthType Basic
require valid-user
取消服务器的auth-request后,我收到以下消息:
需要授权此服务器无法验证您是否有权访问所请求的文档 . 您提供了错误的凭据(例如,密码错误),或者您的浏览器不了解如何提供所需的凭据 . 此外,尝试使用ErrorDocument处理请求时遇到401 Authorization Required错误 .
-
为什么还有401错误
-
为什么我的自定义ErrorDocument没有显示?