- IIS原有站点停用
- IIS新增里新增一个站点,端口及域名和原有站点一致
- 新增公告提示页面,如:index.html
- 新增web.config文件,并设置web.config
-
1 <system.web> 2 <compilation debug="true" targetFramework="4.0"/> 3 <customErrors mode="On" defaultRedirect="/index.html"> 4 </customErrors> 5 </system.web>
- IIS>新站点>错误页>404状态设置:响应操作
- 选择在此网站执行URL
- 设置URL地址(相对于网站根目录),如:/index.html