I have some broken links on my si开发者_StackOverflow社区te, and will keep having new ones on regular basis. How do i write a centralized code in web.config or something for 404 then redirect to home page? I am using aspx, vb.net and IIS7
In the web.config you can have a section as follows -
<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx">
<error statusCode="404" redirect="/" />
</customErrors>
精彩评论