More in this section

Forums / Bugs & Issues / Error 404 pages

Error 404 pages

2 posts, 0 answered
  1. Gooya
    Gooya avatar
    23 posts
    11 May 2010
    16 Oct 2013
    Link to this post
    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?
  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    06 Sep 2017
    21 Oct 2013
    Link to this post

    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
2 posts, 0 answered