說明

首頁,也就是網站預設的頁面,亦即無指定特定頁面時就會顯示的頁面。

之前,我都是利用IIS的GUI來設定各網站的頁面,但是每次要進SERVER,然後開IIS管理員,再進行設定,實在是很麻煩的一件事。

突然靈機一動,想到web.config中應該會有相對應的設定吧。

上網查一查,果然就被我找到了。

解決方法

解決方式如下 (僅支援IIS 7)→

  1:   <system.webServer>
  2:     <defaultDocument>
  3:       <files>
  4:         <clear/>
  5:         <add value="l.aspx"/>
  6:       </files>
  7:     </defaultDocument>
  8:   </system.webServer>

記得要先使用「<clear/>」,把Machine.config中的設定刪除。

參考

Default Document <defaultDocument>

Set Default Page in Asp.net

 

http://www.zakfong.com/2012/03/iis-webconfig.html

相关文章:

  • 2022-12-23
  • 2022-01-11
  • 2021-07-07
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-07-06
猜你喜欢
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-08-21
  • 2022-12-23
相关资源
相似解决方案