Yeah, actually I wrote a whole functionality-set of CF catching 404's.  I
wanted a way to handle "virtual directories" - like www.brainbox.tv/clients
for instance - there's no folder there, but instead I wanted it to relocate
to a point in our main fusebox app.  One of our developers suggested an
ingeniously simple way of doing it, so here's what I did..

In IIS, I pointed 404's to a CF template that checks to see if the
administrator has set up a virtual directory for whatever URL the user is
trying to access.. I wrote an interface to do a few different kinds of
virtual paths, one for URL's, one for Fuseactions, one to force a 404.  Also
if the 404 was thrown, it handles it a little more elegantly than normal 404
errors.  I'm constantly evolving this - it has a lot of power.  It's a lot
easier to give a client a URL like brainbox.tv/whatever than some long
fuseaction... and I no longer have to make folders and index.cfm's to show
some sample images for clients.  That combined with our content management
makes me almost never have to Remote Admin in to put some stuff up for
clients, which is one less monkey on my back and good service for them.

That's a lot more than you were asking, but....

Here's how to set it up in IIS:
http://www.brainbox.tv/404.gif

HTH,
-Bill
brainbox

----- Original Message -----
From: "jim sullivan" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 12:37 PM
Subject: handling 404 errors with CF?


> Can CF handle 404 errors?
> that is, can CF catch a 404 (page not found) error and send back a custom
> error page?
> I tried using cferror for this and it doesn't seem to work..
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to