Answer the question
In order to leave comments, you need to log in
How to prevent viewing files in the server directory?
Hello! I generate reports in PDF and PNG and add them to a specific folder. They are loaded via ajax, i.e. you can’t find their address from the old code .. but you can find it through the console, take the address from there and directly access it in the browser.
I tried to close files of a certain type in htaccess but did not get a tangible result
<FilesMatch "\.(pdf|png)$">
Order Allow,Deny
Deny from all
</FilesMatch>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question