I have multiple applications on my server. For each
application I would like an error handler that will catch missing
.cfm files. If a user types in www.abc.com/test.cfm, and test.cfm
does not exist, each site will use its own "errorHandler.cfm" file
I already can handle .htm and .html files in IIS, basically
when the 404 error happens, it calls my html error handler. I also
tried checking the option in IIS where you see a list of file
extensions, you go to .cfm (this is all in IIS), and there is a
checkbox that says "check if file exists", so I have checked and
unchecked this, but not luck.
In CFAdmin there is an area where you can specify a missing
template handler. This seems to apply to the whole server. Each of
our application are very different, I would like to have an
individual error handler in each application.
I am getting a CF error, (File not Found) not an IIS error
when you type a file in the url string as mentioned above. I tried
using <cferror> in my Application.cfm file, but to no avail.
I tried using try/catch to no avail. I have heard of others having
this frustration as well.
I've not tried this, but consider having the server-wide
error handler look at the CGI.HTTP_REFERER variable to see what
application threw the error. Then do a <CFLOCATION> to the
application-specific error handler.