ASP.NET/IIS: 404 for all file types

后端 未结 7 723
走了就别回头了
走了就别回头了 2020-12-20 21:51

I set up 404 handler page in web.config, but it works ONLY when extension of URL is .aspx (or other which is handled by ASP.NET). I know I can setup static HTML page in webs

7条回答
  •  南笙
    南笙 (楼主)
    2020-12-20 22:43

    In IIS you can set a Custom Error for 404 errors and direct it to a URL in the site properties.

    It shows a static html by default C:\WINDOWS\help\iisHelp\common\404b.htm

    You can change it to a relative url on your site.

提交回复
热议问题