[closed] Custom 404 page issues

I am using Farcry 7.2.5 and would like to create a custom 404 error page described here:

I have a 404.cfm in the /errors/ folder, but there are several issues with the 404 page:

1. Pages display a 404 error message above my 404.cfm content

2. A different server error page is displayed at mysite.com/test. (note the period at the end)

3. A different server error page is displayed at mysite.com/test.jpg (Error page: https: slash slash)

All these different URLs should go to the same 404.cfm page…has anyone else come across these issues?

I’ve found one way to do this:

  1. Have your static error page* in the www root (e.g. {project}/www/404.html)
  2. Have the following in your {project}/error/404.cfm page: <cfinclude template="../www/404.html">
  3. Setup your IIS/apache server to serve 404.html on a 404 error

This way you get a consistent setup regardless of the error source. This can also work for error 500.

*I prefer to have a static html error page in case something in ColdFusion caused the error

2 Likes

Thank you! It worked for my first and third issues. To solve the second I did this: http://serverfault.com/questions/456803/trailing-dots-in-url-result-in-empty-404-page-on-iis