我有一个.htaccess文件:
<limit GET> order deny,allow deny from all allow from 123.456.789 </limit> ErrorDocument 403 /403.shtml
但是,这会影响整个目录及其中的文件。 我只是想要这影响主目录的URL,但不是其中的文件。
例如:
http://test.com/test/ = 403禁止的错误
http://test.com/test/file.png =没有错误
http://test.com/test/file2.png =没有错误
我怎样才能改变我的.htaccess文件来完成呢?
听起来就像你只是想禁止目录列表。 Options -Indexes将做到这一点。