E
E
easy_katka2021-02-12 09:57:35
Apache HTTP Server
easy_katka, 2021-02-12 09:57:35

Deny from all doesn't work, why?

Good afternoon, I want to cut down direct access to files from one folder, there I have photos that unauthorized people should not see. Well here is the code

<FilesMatch ~ "\.(php|htm|html|jpg)$">
  Order allow,deny
  Deny from all
</FilesMatch>

skips jpg, that is, if you make direct access to example.ru/img/test.jpg, then I see the picture and should not, based on the code above.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2021-02-12
@galaxy

In Apache 2.4 you need to do this:
Require all denied

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question