window下IIS限制某个目录执行PHP

上传目录我们肯定是要禁止php的执行的,我们可以这样去限制。

如下使用iis的URL规则工具进行处理:

这样所有访问upload目录后缀为php的文件全部禁止访问,

<configuration>

<system.webServer>

<rewrite>

<rules>

<rule name="php404" stopProcessing="true">

<match url="^upload/(.*).php$" />

<action type="AbortRequest" />

</rule>

</rules>

</rewrite>

</system.webServer>

</configuration>

文章地址:https://www.apizl.com/archives/view-140548-1.html

猜你喜欢

转载自blog.csdn.net/moxun2011/article/details/82288842
今日推荐