I want to prevent all file access and directory browsing for a directory without putting a .htaccess file in said directory.
For example, let\'s say this is in my root w
Enable mod_rewrite with
$ sudo a2enmod rewrite
Append this to your .htaccess;
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^myframework/ - [F,L]
</IfModule>
Have this code in your DOCUMENT_ROOT .htaccess file
Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteRule ^myframework/ - [NC,F,L]