我有一个目录,并通过htaccess来保护IP限制。
IP限制工作良好,但只适用于目录的.php文件。
示例:
site.com/dir/ <-- Get Access Denied Error
site.com/dir/index.php <-- Open page without access denied error我的.htaccess文件:
ErrorDocument 404 /notfound2.html
ErrorDocument 403 /notfound2.html
AuthName "Access Restrict"
AuthType Basic
<Limit GET POST>
order deny,allow
deny from all
allow from 47.147.50.5
</Limit>我希望将一个目录(所有对象也包括php文件)限制为仅从一个IP访问。
问题出在哪里?
发布于 2012-11-21 18:39:44
似乎您想拒绝目录列表。
对于特定文件,请尝试使用Option -Indexes或IndexIgnore *.tgz *.sql *.tar。
https://stackoverflow.com/questions/13433358
复制相似问题