How to prevent “aspxerrorpath” being passed as a query string to ASP.NET custom error pages

后端 未结 11 793
夕颜
夕颜 2020-12-29 03:36

In my ASP.NET web application, I have defined custom error pages in my web.config file as follows:



        
11条回答
  •  有刺的猬
    2020-12-29 03:43

    I use javascript like

    if (location.search != "") { window.location.href = "/404.html"; } 
    

提交回复
热议问题