Error 404 pages
Hello
I'm using IIS6 and have sitefinity 6.1 site on it.
When some user write fake path in url like /dsafsdafsdasdffsd , the iis throws iis exception Failed to Execute URL.
So I wrote function in global.asax that catches that error and redirects them to error page:
void Application_Error(object sender, EventArgs e) HttpContext.Current.ClearError(); Response.Redirect("~/en/page404"); Hello,
You need to add the following settings in your web.config file:
<configuration> <system.web> <customErrors mode="On" defaultRedirect="/error-pages/default-error"> <error statusCode="404" redirect="/en/page404.html" /> </customErrors> </system.web></configuration><configuration> <system.webServer> <httpErrors errorMode="Custom" defaultResponseMode="File" existingResponse="Replace"> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" path="/en/page404.html" responseMode="ExecuteURL" /> </httpErrors> </system.webServer></configuration>