Copy link to clipboard
Copied
I am attempting to setup a custom 404 error with CF10 and IIS 7.5. Previous to CF10 (and IIS 7), you can get the URL of the non-existent page via the querystring (e.g., 404;http://www.example.com/some/file.html) when the custom 404 page is processed. However, with CF10 and IIS 7.5, the querystring returns 404;http://www.example.com/jakarta/isapi_redirect.dll. Is there a way to retrieve the actual URL of the missing path, like in prior versions?
Copy link to clipboard
Copied
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/handler.cfm" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
The "Missing template handler" is not defined in CF, we use the 404 error page setting in IIS.
As of right now, my test site on this server is just a basic 500 line .cfm file.
I've tested with non-exsistent directories, .html and .cfm. Everything works.
Except when I try to redirect to certain pages based on cgi.QUERY_STRING
Copy link to clipboard
Copied
Using IIS may be the reason why QUERY_STRING is missing.Why not try a custom 404 page in the CF Admin and dump the CGI scope to see what it gets?
Copy link to clipboard
Copied
I will test today and post back. But as far as I know, the missing template handler is server wide. Correct?
Copy link to clipboard
Copied
Yes it is server-wide. I suppose you could examine the CGI scope to see if you could serve different responses to different domains.
It'll be interesting to see what CGI variables it gives you, if any! If it does give you the data you need, you can use it as your new handler. We do this to give "intelligent" results to users, for example, we have an e-commerce site and it will show alternative/similar products if one is no longer available. Btw, check using a web sniffer to make sure your 404 handler actually does return a 404 error, otherwise it can cause SEO issues (if that is important to you.)
Copy link to clipboard
Copied
I can't seem to get the CFAdmin to accept a path for the "Missing Template Handler" Could be an issue trying to go from one partition to another.
But, I don't really see this as a viable solution. We have 39 sites on this server right now, and will add more (our other servers usually have ~100).
Copy link to clipboard
Copied
FYI I've created a bug report for this issue earlier here: https://bugbase.adobe.com/index.cfm?event=bug&id=3630245 You can vote on getting this fixed there.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more