Reputation: 21
I have some broken links on my site, 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
Upvotes: 2
Views: 2026
Reputation: 5357
In the web.config you can have a section as follows -
<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx">
<error statusCode="404" redirect="/" />
</customErrors>
Upvotes: 3