It is probably very simple but I can't find it. I want to make a .htaccess file so no one can get into the folder. except for the php on the server.
does anyone know the code line?
Thanks Matthy
It is probably very simple but I can't find it. I want to make a .htaccess file so no one can get into the folder. except for the php on the server.
does anyone know the code line?
Thanks Matthy
You want
Deny from all
Instead of denying all traffic you could try redirecting it with mod_rewrite to make it useful i.e. back into the flow of the site.
RewriteEngine on
rewriteRule ^path/to/forbidden/directory/? index.php [L]
Maybe it's better to change the rights and ownerships of the folder instead of using .htaccess to do it.
Deny from All
is the way to do it in .htaccess
<Files *.*>
order allow,deny
deny from all
</Files>