如何使用web.config文件在IIS中禁用Web目录索引?

时间:2018-10-18 09:39:53

标签: iis-7

如何在IIS 7中启用/禁用Web目录索引?我找不到web.config文件。但是我可以在以下行中找到applicationHand.config文件:<directoryBrowse enabled="true" />

我在同一文件夹中创建了web.config文件,并添加了以下内容。它不起作用。

<configuration>
<location path="Secured">
    <system.webServer>
      <directoryBrowse enabled="true" />
    </system.webServer>
  </location>
</configuration>

我还有一个问题,就是默认情况下在IIS和Apache2中禁用了Web目录索引编制吗?

0 个答案:

没有答案