上层文件夹

时间:2015-12-11 14:14:14

标签: php apache .htaccess errordocument

假设我有这样的目录结构:

  • .htaccess with [ErrorDocuments规范]
  • 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后,我收到以下消息:

  

需要授权

     

此服务器无法验证您是否有权访问   文件要求。您提供了错误的凭据(例如,   密码错误),或者您的浏览器不了解如何提供   需要凭证。

     

此外,遇到401 Authorization Required错误   尝试使用ErrorDocument来处理请求。

  1. 为什么会有额外的401错误
  2. 为什么我的自定义ErrorDocument没有显示?

0 个答案:

没有答案