
慕哥6287543
要禁用对子目录的所有访问(最安全),请使用:
Order Deny,Allow
Deny from All 如果您只想阻止直接提供PHP文件,请执行以下操作:1 - 确保您知道服务器识别为PHP的文件扩展名(并且不允许人们在htaccess中覆盖)。我的一台服务器设置为:# Example of existing recognized extenstions:AddType application/x-httpd-php .php .phtml .php32 - 基于扩展,将正则表达式添加到FilesMatch(或LocationMatch)
Order Deny,Allow
Deny from All
或者使用Location来匹配php文件(我更喜欢上面的文件方法)
Order Deny,Allow
Deny from All
1381

被折叠的 条评论
为什么被折叠?



