Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> 電腦軟體教學 >> 伺服器技術 >> 關於伺服器

Windows Server 2003 預設不支援 SHTML?一鍵啟用 SSI 解決

編輯:關於伺服器

現象

IIS 6 預設**不解析 .shtml 副檔名**,直接回傳原始碼或 404,導致 Server Side Include (SSI) 指令 (如 ) 不生效。

解決方法

  1. 開啟「Internet 資訊服務 (IIS) 管理員」。
  2. 展開本機電腦 → 右鍵「Web 服務擴展」 → 選擇「在伺服器端包含檔案」 (Server Side Includes)。
  3. 點擊「允許」按鈕,狀態變為「允許」。
  4. 必要時重啟 IIS (iisreset)。

補充說明

  • SSI 僅支援 .shtml、.stm、.shtm 預設副檔名;如需擴充至 .html,請在「網站」→「內容」→「主目錄」→「配置」→「對應」新增 .html 指向 ssinc.dll。
  • SSI 具備安全風險 (包含任意檔案),僅在受信任內容目錄啟用,並嚴格限制寫入權限。
Copyright © Windows教程網 All Rights Reserved