Error 404 pages

Posted by Community Admin on 04-Aug-2018 12:35

Error 404 pages

All Replies

Posted by Community Admin on 16-Oct-2013 00:00

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)

That works for fake page like /dsafsdafsdasdffsd , but page /en/dfsdfdsddfasds show blank page with no content(not even html tags).
I know upper exception is iis issue, but I think /en/dfsdfdsddfasds page is sitefnity issue. Is there any solution?

Posted by Community Admin on 21-Oct-2013 00:00


You need to add the following settings in your web.config file:

      <customErrors mode="On" defaultRedirect="/error-pages/default-error">
          <error statusCode="404" redirect="/en/page404.html" />

      <httpErrors errorMode="Custom" defaultResponseMode="File" existingResponse="Replace">
           <remove statusCode="404" subStatusCode="-1" />
           <error statusCode="404" path="/en/page404.html" responseMode="ExecuteURL" />

If a user enter an invalid address, he/she will be redirected to the page that you have point above.

Let me know whether the proposed solution helps.

Svetoslav Manchev
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed