- Impact
- 0
This isn't really 'code,' but it's similar to code.
If you have include directories, template directories, or other private directories, why allow users to access them? Instead, use mod_rewrite!
If you have include/ and want to hide it, add this to your .htaccess file:
You can use that again, but just remove "RewriteEngine On" and change "include" to the directory you want to hide.
10,000,000 in 10,000,001 servers have mod_rewrite.
I would also like to note that all PHP scripts or Perl scripts can access the files, even with this.
If you have include directories, template directories, or other private directories, why allow users to access them? Instead, use mod_rewrite!
If you have include/ and want to hide it, add this to your .htaccess file:
Code:
RewriteEngine On
RewriteRule ^include$ /dev/null
RewriteRule ^include/(.*)$ /dev/null
You can use that again, but just remove "RewriteEngine On" and change "include" to the directory you want to hide.
10,000,000 in 10,000,001 servers have mod_rewrite.
I would also like to note that all PHP scripts or Perl scripts can access the files, even with this.