Reputation: 1161
Currently i have this:
#Expections
RewriteCond %{REQUEST_URI} ^/uploads.*$
RewriteRule ^(.*)$ - [L,NC]
This serves the entire folder uploads. But I want to serve the images inside, not the entire folder. Meaning, if somebody types in: mydomain.com/uploads, I don't want them to see a list of images inside that folder but I want to say, forbidden. Only if they have the exact URL they can see the image.
Upvotes: 0
Views: 31
Reputation: 206
You need to add an option to Apache to disable the displaying the contents of a folder
<Directory /var/www/.../uploads>
Options -Indexes
</Directory>
Replace "..." with the location of your website. If there are other options within the Directory command, keep those.
Upvotes: 1