Block direct file access

0

I need to block direct access to files in a directory, for example public_html / repository. In this folder (repository) contains images (jpg), pdfs etc.
I do not want someone to directly access this folder (listing its contents) or directly accessing one of the files through the link www.meusite.com.br/repositorio/abc.jpg
I used the following command in the .htaccess file: Options -Indexes. It blocked the file listing when I enter www.mysite.com/repository/, but it allows me to access the file directly.

IMPORTANT: I already used the deny from all command in htaccess and it blocked access to the file. But when I access my site, the image also does not open ...

Thanks for the help.

    
asked by anonymous 30.03.2017 / 21:31

0 answers