对于configuration不佳的Apache服务器,你可能需要这样做来拒绝对.htaccess文件的访问:
<Files .htaccess> order allow,deny deny from all </Files>
我想拒绝访问所有的系统文件(。* – 任何文件,它的文件名以点开头)。 我知道这可能与FilesMatch …
像这样(但工作):
<FilesMatch .*> order allow,deny deny from all </FilesMatch>
像这样的东西应该工作:
<FilesMatch "^\.(.*)$"> order allow,deny deny from all </FilesMatch>
FilesMatch在那里使用正则expression式。