IIS7.5 URL文件名有加號或空格顯示404錯誤的解決辦法

轉:http://www.gyd.cc/zhuanti/tech/9319.htmlhtml

將服務器由windows2003升級到windows2008後,某個網站的圖片忽然不能顯示,顯示404錯誤,

後來發現,包括僞靜態,只有URL中有加號或空格,都會報404錯誤,深圳建站公司提醒你們,必定要注意這個問題。

web

問題及緣由:

window2008下iis7環境下,url中包含空格或加號的僞靜態,將不能正常訪問,好比:http://www.abc.com/gyd+cc.html 會出現請求篩選模塊被配置爲拒絕包含雙重轉義序列的請求。瀏覽器返回 HTTP 錯誤 404.11 – Not Found錯誤。

windows

解決辦法:

在站點根目錄新建或編輯web.config 文件,找到<system.webServer>節點,添加<requestFiltering allowDoubleEscaping=」true」> 。


代碼效果以下:

<configuration>
< system.webServer>
< security>
< requestFiltering allowDoubleEscaping="true"></requestFiltering>
< /security>
< /system.webServer>
< /configuration>api

相關文章
相關標籤/搜索