I've got quite a few CF5 templates in which I'd like to generate an error page
that returns an HTTP 404 status code (using <cfhead>).  Most are constructed as
follows, usually with a number of queries and tests which may throw the error:

<cfsilent>

<cfquery name="myquery" ...>

</cfquery>

<cfif myquery.recordcount eq 0>
   [ throw error here ]
</cfif>

</cfsilent>


The problem is:

1. If I do a redirect (<cflocation>) to the error page that puts up the 404
error, the _first_ status code returned is a 302 (object moved).

2. If I <cfinclude> the error page, the <cfsilent> suppresses its HTML output.


The second problem wouldn't be such a big deal if I didn't need to refit so
many existing templates.

Suggestions?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com

Reply via email to