Answer the question
In order to leave comments, you need to log in
How to deny access to all files by URL in a specific folder via root .htaccess?
It is necessary that it was forbidden to run PHP files in certain folders by URL. These PHP scripts are only used for requre and include, through other PHP files, so you need to hide them from users. The variant with a redirect through RewriteRule is not suitable. Putting the .htaccess file with "deny from all" in the folder you want to hide is also not. What other options might there be?
Answer the question
In order to leave comments, you need to log in
Deny access to a folder
Deny access to a folder and everything inside itRedirectMatch 403 ^/папка/.*$
The most correct way is to move these files outside the site root.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question