Apache directory listing restriction per IP bases
i need to limit the directory listing for all users except certain IP's. Any idea how to do that?
the option for it should be:
Options -Indexes
and let's say the directory i need to restrict is /restricted/
<Directory /restricted>
Options -Indexes
</Directory>
but how to place the IP restriction for all but, for instance, 127.0.0.1
Any h开发者_运维问答elp will be greatly appreciated
Options -Indexes
<Files *>
deny from all
allow from 213.106.26.195
allow from 213.106.15.132
Options +Indexes
</Files>
I used directive because I tried it in .htaccess, but in your server profile you can use the directive as well, of course.
精彩评论