环境:windows server 2012 asp.net
找到网站目录:wwwroot ,打开web.config文件,在
在<files>与</files>之间加入代码
添加如下:
<clear />
<add value="index.php" />
<add value="Default.htm" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
效果是:
<?xml version="1.0" encoding="UTF-8"?> <!-- 有关如何配置 ASP.NET 应用程序的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <system.webServer> <defaultDocument> <files> <clear /> <add value="index.php" /> <add value="Default.htm" /> <add value="index.htm" /> <add value="index.html" /> <add value="iisstart.htm" /> <add value="default.aspx" /> </files> </defaultDocument> </system.webServer> </configuration>
时间: 2024-10-13 01:32:23