How do you block directory scans using htaccess?

From Joomla! Documentation

Revision as of 17:21, 11 October 2008 by Jabama (talk | contribs) (New page: '''Directions''' Add Apache rewrite rules to your .htaccess file. For example, the following will redirect all attempts to access files with names starting with, "phpMyAdmin" to index.php...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Directions

Add Apache rewrite rules to your .htaccess file. For example, the following will redirect all attempts to access files with names starting with, "phpMyAdmin" to index.php.


Sample Apache Rewrite Rule

RewriteRule ^/phpMyAdmin.*$ /index.php


Some Regular Expression Tips

^ Means start of filename
. Means any character other than newlines
* Means one or more of the previous character
$ Means end of line