3 Replies Latest reply on Sep 17, 2006 12:01 AM by Stressed_Simon

    Error.Cfm page

    SanTorez Level 1
      Problem: I would like to create a custom error page that fires up only when a template (a coldfusion page) is not found.

      Like: http://www.mywebsite.ca/somepage.cfm in this example somepage.cfm does not exist and I want to show a custom error page.

      I used cferror tag and put it in application.cfm which is in webroot. NotFound.htm is in the same folder

      <cferror type="Request" template="/NotFound.htm">

      No matter how I change the values of type,exception, I can not make it to work.

      I appreciate your advice.

      Note: I am not able to specify a “template not found handler” in “ColdFusion server” since we don’t host our web site.

      Thanks
      Mehran
        • 1. Re: Error.Cfm page
          azadisaryev Level 1
          what you are trying to do will definitely not work, since if there is no such page as requested, the Application.cfm file will not be attached to anything...

          i am still tying to find a solution to this, too, but it looks more and more like the only way to go is define error templates in the server settings...
          • 2. Re: Error.Cfm page
            SanTorez Level 1
            Thank you for your note.

            The web host we have does not want to define an error template in their server settings as this will then cause problems with their other customers.

            We still are looking for the answer.
            • 3. Re: Error.Cfm page
              Stressed_Simon Level 1
              This can be sorted by the web server, depending on whether you are using IIS or apache there are slightly different ways of handling 404 pages. But basically you need t get the Web Server to check of the file exists and if not serve a different 404 page. This is set up on a site by site basis so shols be no problem on a shared host.