I have a directory on my server which contains PHP and image files.
I would like to be able to deny access to everything but the image files, the user should see a 403 if they try to access anything other then an image.
They should also not be able to see the index of page.
I have attached my sample code below it correctly denies access to documents but doesn't allow me to access the images.
The rule needs to apply to all documents folder, they could be located directly under the root or in subdirectories.
Expected output should be something like:
<Directory ~ "documents">
Deny from all
Allow from all