Deny access to the folder for the user, not for php

Using htaccess, you need to lock the _media folder and all the folders and files lying in it. As they say, cut off at the root. But it is important that the folder is blocked for access via the browser bar, as well as for search robots, but not for php. I need to connect to the files in this folder. Well, not only with the help of PHP. For example, <img src="_media/img/logo.jpg"> should also work.

 1
Author: Kevin Romanov, 2020-08-24

2 answers

And you cut the image into n parts, one img for each; you can download it, but you can glue it together...

 1
Author: Sergei Kirjanov, 2020-08-24 23:23:08

As far as I understand, you need to prohibit the output of a list of files. Create a file in the folder .htaccess with content

Options -Indexes

And restart apache

 0
Author: Sheridan, 2020-08-24 13:52:21