gpt4 book ai didi

apache - .htaccess 在一行中指定特定文件

转载 作者:行者123 更新时间:2023-12-04 15:12:03 25 4
gpt4 key购买 nike

我的 .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>

关于apache - .htaccess 在一行中指定特定文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65048199/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com