I recently tried to do some rewrite rules on my ColdFusion site using Helicon APE and could not get them to work for love nor money. It worked fine when rewriting to a non .cfm page, but when rewriting to a .cfm page The result was either a "server error" or a "404.3" error as per the below screenshot
The cause of this is due to the wildcard handler that ColdFusion uses, when you hit a url that gets intercepted by APE due to a rewrite rule which then attempts to rewrite to another CFM page this does not get processed by the wildcard handler, instead APE tries to process the request with a standard script map, the result of which will be different depending on how you have your server setup.
If you have a standard non modified CF install then in addition to the woldcard (*) handler you also have a bunch of regular script map handlers for each extension that ColdFusion handles (*,cfm, *.cfc, *.cfswf etc), these will be named "AboMapperCustom-xxxxxxxx".
Each of these script map handlers points to the file "jrun_iis6.dll" which actually doesn't work at all on IIS 6 or IIS 7 and thus these handlers seem to serve no purpose. Why these handlers are even created I cannot say, my best guess is that they are a leftover legacy setting from IIS 5.
the only handler that is able to process Coldfusion files is the wildcard handler which points to the following connector.
jrun_iis6_wildcard.dll
So in order for APE to be able to work with CFM files or any of the other CF related extensions then you need to update all those script map handlers to point to "jrun_iis6_wildcard.dll" instead of "jrun_iis6.dll".
If you are on a shared host and do not have access to the IIS manager, then you can fix this in your web.config file if you are running on IIS 7, if you are on IIS 6 then you will need to speak with your host as IIS 6 does not have a web.config.
Below is an example of the changes you need to make to your web.config.
If Coldfusion is enabled globally on the server then the <remove> statements disable the original handlers (you must use the original/actual names of the handlers), if Coldfusion is not enabled server wide then you don't need these.
The <add> statements creates a new set of handlers with the correct connector, these can be named anything you like as they are specific to your site. If Coldfusion is already enabled on your site (IIS 7 only) rather than globally then you will already have a bunch of entries like this in your web.config, in which case simply update the "ScriptProcesstor" path as below to point to "jrun_iis6_wildcard.dll" instead of "jrun_iis6.dll".
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="AboMapperCustom-xxxxxxxx" />
<remove name="AboMapperCustom-xxxxxxxx" />
<remove name="AboMapperCustom-xxxxxxxx" />
<remove name="AboMapperCustom-xxxxxxxx" />
<remove name="AboMapperCustom-xxxxxxxx" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfm" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfc" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfml" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfr" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfswf" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
</handlers>
</system.webServer>
</configuration>
Recent Comments