Can you put in a site-wide error handler in CF admin?  If so that would
let you code in pretty much anything you want.  I just reroute to the
current domain's index.cfm, but there's no reason you couldn't do
something more complex/useful.

--Matt Robertson--
MSB Designs, Inc.
http://mysecretbase.com



-----Original Message-----
From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED]] 
Sent: Monday, May 20, 2002 8:43 AM
To: CF-Talk
Subject: CF Error pages and redirects for 404 pages


Hi,

My "challenge of the week" is to provide automated forwarding services
to URL's that return a "File not found" 404 error.  This would act as a
sort of "switchboard" that, whenever a 404 error was encountered, a
query would be run against a database for the requested URL, and if
there were a "new" URL value for that originally requested page, the
user would be redirected there without ever seeing the actual 404 page.

Now, in theory, this is how it would work:

* Create a database table that holds the values for "old" URL's and the
"good" URL's that the old URL's should redirect to
* Create a custom 404 page that executes a query of this table each time
it's (the custom 404 page) executed.  The logic would be something like
this...
  - run query, querying for the "bad" URL value and returning the "good"
URL value
  - If a value is returned,
     + do a cflocation to the new URL
  - If a value is not returned
     + display the 404 page

So, here's the first problem I'm running into.  I have the following set
in my application.cfm: <cfapplication name="redirect_test"> <cferror
type="request" template="404.cfm">

Yet, 404.cfm is not displayed; the standard IIS error page is displayed.
Also, it's documented that request error pages can't have any CF code in
them.  Am I doing something wrong?  Am I missing something?  Is there
any way to accomplish what I need to do?

Thanks

Pete


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to