Skip to main content
rhpt
Known Participant
Aug 1, 2013 4:11 AM UTC
Question

ColdFusion 10, IIS 7.5, and custom 404 page

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?

This topic is closed to new replies. Start a new post to keep the conversation going.

30 replies

Participating Frequently
Oct 30, 2013 10:47 PM UTC

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.

Translate
Participating Frequently
Oct 29, 2013 5:02 PM UTC

Was this ever resolved? Update 11 got us closer with using our custom 404, but then we hit this issue.

Translate
rhpt
rhptAuthor
Known Participant
Oct 30, 2013 2:59 AM UTC

I never found a solution...Very frustrating.

Translate
Legend
Oct 30, 2013 9:01 AM UTC

@vishu#13, having a 302 redirect to a 404 error sounds a bit strange, and may not be good for SEO.

@colfaxschuyler, in your web.config, remove the httpErrors container and replace with this one tag:

<httpErrors existingResponse="PassThrough" />

Please see if that helps, at all.

Custom 404's in ColdFusion 10 are a PITA. We still can't get non .cfm templates to 404 to a custom page and Adobe just do not have a clue!

Translate
Participating Frequently
Sep 9, 2013 8:34 PM UTC

I've got the same issue.  Just curious, are you doing any URL redirection?  For me, I have IIRF running and catching all 404s so I can do custom "search engine friendly" URLs.  The issue with jakarta/isapi_redirect.dll only occurs when I try to access a non-existant .cfm file (oddly doesn't occur when dealing with folders or other file types).

Translate
rhpt
rhptAuthor
Known Participant
Sep 9, 2013 8:47 PM UTC

I have not found a solution, but Miguel-F pointed me to http://stackoverflow.com/questions/18694932/coldfusion-10-iis-non-existant-urls-that-are-cfm-files-retrieving-original-u which has a possible solution.

Translate
Participating Frequently
Sep 10, 2013 5:42 PM UTC

Thanks for the link.  I did some fiddling and found a workaround using IIRF.  I posted instructions on the stackoverflow page you posted.  I think this is a bug that Adobe should address.

Translate
Miguel-F
Inspiring
Sep 9, 2013 5:08 PM UTC

Did you ever figure this out?

Translate
p_sim
Participating Frequently
Aug 6, 2013 1:26 PM UTC
rhpt
rhptAuthor
Known Participant
Aug 16, 2013 4:53 PM UTC

I tried that, but that didn't fix it. The custom 404 works fine, it's just the redirect that's not returning what I expect.

Translate
vishu_13
Inspiring
Aug 16, 2013 6:10 PM UTC

Hi

For 404.cfm to display when access a non -exisiting .cfm and .html, you need to place the 404.cfm in both ColdFusion webroot (wwwroot) and your website's webroot.

Your web.config should look like this

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <system.webServer>

        <httpErrors errorMode="Custom">

            <remove statusCode="404" subStatusCode="-1" />

            <error statusCode="404" prefixLanguageFilePath="" path="/404.cfm" responseMode="ExecuteURL" />

        </httpErrors>

    </system.webServer>

</configuration>

Now when you access a non exisiting .html say http://www.adobe.com/hello.html then URL should redirect to http://www.adobe.com/404.cfm, below are the steps to follow.

If you want to do the same for site level, then go to error pages in IIS for your site

Choose Respond with a 302 direct with the 404.cfm URL placed in the webroot of your website

Hope it helps

Thanks

VJ

Translate
vishu_13
Inspiring
Aug 1, 2013 7:33 PM UTC

Is jakarta (virtual directory) added in your website under IIS?

Translate
rhpt
rhptAuthor
Known Participant
Aug 2, 2013 7:48 PM UTC

Yes. I should also mention that this legacy app still uses Application.cfm, so I can't use the OnMissingTemplate function of Application.cfc

Translate
Participating Frequently
Aug 1, 2013 8:10 AM UTC

what do you get if you dump the CGI scope?

Translate
rhpt
rhptAuthor
Known Participant
Aug 1, 2013 4:07 PM UTC

I don't get the original path in Script_Name, Path_Info, or Querystring. Really, nothing that tells me that a 404 occured,

Translate