我想用 apache 身份验证保护目录,但只有一个文件,所以我做了:
<目录 /path/to/dir>
 AuthType Basic
 AuthName "Private  Pages"
 AuthBasicProvider file
 AuthUserFile /path/to/.htpasswd
 require user userid
 <FilesMatch "^exception.html$">
    Order Allow,Deny
    allow from All
 </FilesMatch>
</目录>
但它并非所有文件都要求输入密码。我还尝试在文件名中的点之前使用 \ 并使用:
<File exception.html>
没有什么可以帮助它要求所有文件的密码,包括 exception.html
我做错了什么?
谢谢