Php 从.htaccess中的密码保护中排除一个文件

Php 从.htaccess中的密码保护中排除一个文件,php,regex,apache,.htaccess,Php,Regex,Apache,.htaccess,在.htaccess中,我有以下代码使用密码保护文件: <FilesMatch "\.(html|htm|css|js|php|swf|swz|xml|ico|jpg|jpeg|png|txt)$"> AuthName "Member Only" AuthType Basic AuthUserFile /path/to/password/.htpasswd require valid-user </FilesMatch> AuthName“仅限成员” AuthType

.htaccess
中,我有以下代码使用密码保护文件:

<FilesMatch "\.(html|htm|css|js|php|swf|swz|xml|ico|jpg|jpeg|png|txt)$">
AuthName "Member Only"
AuthType Basic
AuthUserFile /path/to/password/.htpasswd
require valid-user
</FilesMatch>

AuthName“仅限成员”
AuthType Basic
AuthUserFile/path/to/password/.htpasswd
需要有效用户
如何从这里排除应排除的
。php
受密码保护?
如果需要,我可以更改保护线,但我认为可以在regex中执行一些操作。

类似以下的操作如何:

<FilesMatch "\.(html|htm|css|js|php|swf|swz|xml|ico|jpg|jpeg|png|txt)$">
    AuthName "Member Only"
    AuthType Basic
    AuthUserFile /path/to/password/.htpasswd
    require valid-user
</FilesMatch>
<Files /should_be_excluded.php>
    Order Allow,Deny
    Allow from all
</Files>

AuthName“仅限成员”
AuthType Basic
AuthUserFile/path/to/password/.htpasswd
需要有效用户
命令允许,拒绝
通融

这应该允许ALL访问排除的文件?

这不起作用,您尝试过吗?如果是,您使用的是什么版本的apache?您认为问题出在哪里?@Centurion尝试在下面添加
满足所有人
允许所有人