It is probably very simple, but I can not find it. I want to create a .htaccess file so that no one can get into the folder. except php on the server.
Does anyone know a line of code?
Thanks Matthy
Do you want to
Deny from all
Instead of rejecting all traffic, you can try redirecting it with mod_rewrite to make it useful, that is, returning to the site stream.
RewriteEngine on rewriteRule ^path/to/forbidden/directory/? index.php [L]
It might be better to change the rights and owners of the folder instead of using .htaccess for this.
Deny from All
is a way to do this in .htaccess
<Files *.*> order allow,deny deny from all </Files>