0

Im using native EE image manipulations to create small images. How ever, EE saves the original files, and everyone can access to those.

I need to deny access to these original images but allow access to sub directories EE is created.

So, simple example: /myimages/_cropped/image.jpg and /myimages/_customsmall/image.jpg

Those are the files that I need to serve to visitors.

But I want to deny access to original images that are saved to /myimages/image.jpg

How this can be done with something like via htaccess? I've tried to google but did'nt find any articles about this. I do not wat to use any password protection, but deny from all (the main directory) and yet to allow needed sub directories.

Thanks in advance.

1 Answer 1

0

Easy peasy. Use .htaccess rules.

For /myimages/.htaccess:

Order deny,allow
Deny from all

for /myimages/whateverdirectory/.htaccess:

Order allow,deny
Allow from all
1
  • 1
    Thanks. Few first refreshes did show no-go but force refresh and works. Ah, good! :)
    – Riverboy
    Jul 19, 2015 at 19:53

Your Answer

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

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