网站默认文档配置

之前在本地上把网站部署到IIS,发现如果只输入localhost:xxxxx 无法自动访问到网站主页,还得在IIS上配置一个默认首选项。最近自己接个小私活,发现其实通过配置web.config可以更好的解决这个问题,而且对网站的SEO优化也非常有利。具体配置如下:

  <!--默认文档设置-->
  <system.webServer>
    <defaultDocument>
      <files>
        <clear/>
          <add value="index.aspx"/>   
      </files>
    </defaultDocument>
  </system.webServer>
原文地址:https://www.cnblogs.com/byvar/p/4414979.html