My web.config looks like this:
<configuration>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/error-404.cfm" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
If I navigate to page that doesn't exist, it correctly loads up the 404 page, but chrome's network log shows a 200 response. How can I make sure there's a 404 response? Or does it matter?
For anyone running into a similar issue, this worked for me; put
<cffunction name="onMissingTemplate">
<cfinclude template="error-404.cfm" >
</cffunction>
in the application.cfc file, then put
<cfheader statuscode="404" statustext="Not Found"> at the top of error-404.cfm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With