0

I have a sub directory in my files directory which I want to store private images. I display the images with their watermark, via the imagecache modules.

I thought I could make the directory (with the original images) hidden to the public simply by dropping an .htaccess file in the folder, with

deny from all

but the files are still publicly accessible. What am I missing?

1 Answer 1

0

If you want to basically prevent hotlinking images, you can try the following in your .htaccess file

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.