在我的网站里面我有一个目录/ here / is / / dir / path
我想允许访问子目录中的单个文件示例:test / testfile.xml但是要拒绝访问其他文件列表(jsp,class,jar,xml)
我有这个我想放在httpd.conf中
<Directory /here/is/the/dir/path >
<FilesMatch "test.xml">
Order Allow,Deny
Allow from All
Deny from None
</FilesMatch>
<FilesMatch "+\.(jsp|class|jar|xml)">
order allow,deny
deny from all
</FilesMatch>
</Directory>
这是写这个的正确方法吗?有没有办法将我的两个文件匹配语句组合成一个语句?
所述方法已经过测试并且正在运行。