Give no one access in a directory .htaccess
snippet in htaccess

Give no one access in a directory .htaccess

user6434

Deny from all

Give no one access in a directory .htaccess

user8969

RewriteEngine on
rewriteRule ^path/to/forbidden/directory/? index.php [L]