- 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