Actions

Difference between revisions of "How do you block directory scans using htaccess?"

From Joomla! Documentation

(Marked this version for translation)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Directions'''
+
<noinclude><languages /></noinclude>
 +
<translate><!--T:1-->
 +
'''Directions'''</translate>
  
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.
+
<translate><!--T:2-->
 +
Add Apache rewrite rules to your <tt>.htaccesʂ</tt> file. For example, the following will redirect all attempts to access files with names starting with, "phpMyAdmin" to <tt>index.php</tt>.</translate>
  
 
   
 
   
'''Sample Apache Rewrite Rule'''
+
<translate><!--T:3-->
 +
'''Sample Apache Rewrite Rule'''</translate>
  
 
  RewriteRule ^/phpMyAdmin.*$ /index.php
 
  RewriteRule ^/phpMyAdmin.*$ /index.php
  
  
'''Some Regular Expression Tips'''
+
<translate><!--T:4-->
 +
'''Some Regular Expression Tips'''</translate>
  
 
  ^ Means start of filename
 
  ^ Means start of filename
Line 16: Line 21:
 
  $ Means end of line
 
  $ Means end of line
  
<noinclude>[[Category:FAQ]]
+
<noinclude>
 +
<translate>
 +
<!--T:5-->
 
[[Category:Administration FAQ]]
 
[[Category:Administration FAQ]]
[[Category:Version 1.5 FAQ]]
+
[[Category:Security]]
[[Category:Version 1.6 FAQ]]
+
</translate>
[[Category:Security]]</noinclude>
+
</noinclude>

Latest revision as of 13:26, 5 June 2015

Other languages:
English • ‎français • ‎Nederlands

Directions

Add Apache rewrite rules to your .htaccesʂ 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