I am trying to restrict access to viewing Directory Indexes or viewing lists of files in a directory unless your IP is in a whitelist.
I am using Apache web server and an
So here is what I have so far
Options -Indexes <Files *> deny from all allow from 18.104.22.1686 allow from 22.214.171.1248 Options +Indexes </Files>
This partially works. This does restrict directory viewing to everyone unless there IP is listed. The problem is it also restricts non-whitelisted IP's from viewing files as well.
I need to restrict there access from directory lists but not direct file access.
Please help me