我的.htaccess文件中包含以下内容:
# the following prevents display of the filetohide file
<files handler.php>
order allow,deny
deny from all
</files>
<files submit.php>
order allow,deny
deny from all
</files>
不能在一组标签内完成多个文件说明符,即:
<files submit.php|handler.php|otherfile.txt>
order allow,deny
deny from all
</files>
问候罗素
如果可以帮助你使用不同格式的多个文件名,请尝试以下方法(我尚未进行测试,但基于正则表达式编写了此文件)。
<files ~ "^((submit|handler)\.php)$|^(otherfile\.txt)$">
order allow,deny
deny from all
</files>
谢谢,这似乎行得通。我也做了第三个文件,如:<文件〜“ ^((提交|处理程序)\。php)$ | ^(data_base_update \ .txt)| ^(thingsdata \ .txt)$”>