> You can use fileExists w/ a URL but unfortunately, if the server has a 404
> handler than it will return true even when the 404 handler fires.
>
> <cfif fileExists("http://www.raymondcamden.com/index2332.cfm";)>
> yes
> </cfif>
>
> <cfhttp url="http://www.raymondcamden.com/index2332.cfm";>
> <cfdump var="#cfhttp#">
>
> If a 404 handler isn't there, then this would have worked.

If you're building a 404 handler, you should actually make sure it
returns a 404 status code. You can do this easily enough with
CFHEADER. The page can contain whatever HTML you want to present to
the user, still.

I run into this quite a bit working with the Google Search Appliance.
The GSA relies on status codes by default to identify which pages to
index. While it's possible to give it a way to identify soft 404s
(http://en.wikipedia.org/wiki/HTTP_404#Soft_404), it's much easier
just to have real 404s in the first place.

Dave Watts, CTO, Fig Leaf Software
1-202-527-9569
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358230
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to