我需要IIS重写规则来拒绝访问以“”开头的所有文件和文件夹。
.git .composer .htaccess之类的文件(我知道是用于Apache的)
任何像/..test/A+ if规则这样的文件夹都可以覆盖以“”开头的任何文件夹。但不是这个“.众所周知的/极致的挑战”
谢谢
发布于 2017-04-01 22:19:38
嗯,我想我找到了;)
将此添加到web.config中,确保<规则>在<rules>中。
<rules>
...
<rule name="Deny files and folderd starting with ." patternSyntax="ECMAScript" stopProcessing="true">
<match url="(^\.|\/\.)" ignoreCase="true" negate="false" />
<conditions logicalGrouping="MatchAll">
</conditions>
<action type="AbortRequest" />
</rule>
<rules>https://stackoverflow.com/questions/43047795
复制相似问题