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

 

window2008下iis7環境下,url中包含空格或加號的僞靜態,將不能正常訪問。web

會出現請求篩選模塊被配置爲拒絕包含雙重轉義序列的請求。瀏覽器返回 HTTP 錯誤 404.11 – Not Found錯誤。api

 

解決辦法:

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


代碼效果以下:

瀏覽器

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

經測試 須要用security包裹,另外若是<system.webServer>裏有其它內容,請放到< system.webServer>裏的第一行。測試

相關文章
相關標籤/搜索