繁体   English   中英

拒绝除某些IP外的所有文件夹,但允许完全访问某些文件

[英]Deny folder to all but certain IPs, but allow full access to certain files

我有一个要限制访问的文件夹,但我希望每个人都可以访问具有相同开头的多个文件。 我已经有了阻止,但似乎无法使allow文件工作。 这就是我所拥有的:

order deny,all
deny from all
allow from 127.0.0.1 
#There's several lines of real IPs here
<FilesMatch "^myfiles*\.php$">
  order Allow,Deny
  Allow from all
</FilesMatch>

顺序错误还是其他原因?

我认为正则表达式不正确,请尝试:

<FilesMatch "myfiles.*?\.php$">
   Satisfy any  
   order Allow,Deny
   Allow from all
</FilesMatch>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM