...

Help with regexp in <Files> tag of .htaccess

AlexV
07-19-2011, 09:03 PM
For poorly configured Apache servers you can have to do something like this to deny access to the .htaccess file:
<Files .htaccess>
order allow,deny
deny from all
</Files>

I would like to deny access to all system files (.* - any file that it's filename starts with a dot). I know it's possible with FilesMatch...

Something like this (but working :p):

<FilesMatch .*>
order allow,deny
deny from all
</FilesMatch>

AlexV
07-21-2011, 07:13 PM
Found the solution:

<FilesMatch "^\.">
order allow,deny
deny from all
</FilesMatch>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum