Quantcast
Channel: Adobe Community : Popular Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 14291

CF10 and IIS 7.5 - cfheader in 404 custom error handler not working correctly

$
0
0

I'm getting some really weird behavior when handling 404 errors after updating to CF10 using IIS 7.5 on a Win2k8 R2 x64. IIS randomly delivers only a portion of the HTML page when I set the 404 status code using <cfheader statuscode="404" statustext="Not Found"> inside my 404 handler page (/404.cfm).

 

In IIS, I specify "/404.cfm" (execute a URL) as my custom error handler page for 404 errors, which in turn calls <cfheader statuscode="400" statustext="Not Found">. This has worked really well up through CF9. However, after updating to CF10, something is broken.

 

When I remove the code: <cfheader statuscode="404" statustext="Not Found"> from my 404.cfm page, the problem goes away, but so does the 404 status code, which means that search engines will see this as a legitimate document. The question is, how can I return both the content of my 404.cfm page (it simply suggests other pages that the user might be looking for) AND the 404 not found status code?

 

Any ideas?


Viewing all articles
Browse latest Browse all 14291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>