I've also asked this question on Stackoverflow, but I thought this would've been a better place to ask.
We have the following rewrite rule on IIS7.5:
<rule name="Anything else to the event handler" enabled="true" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{PATH_INFO}" pattern="^.*(/index.cfm/).*$" negate="true" />
</conditions>
<action type="Rewrite" url="/index.cfm/{R:1}" appendQueryString="true" logRewrittenUrl="true" />
</rule>
However, it never puts the /{R:1} after it. It just goes to /index.cfm. We need to actually get the reference variable, because we use this in our ColdFusion (10) scripts. An example url rewrite we would like:
From: http://www.my-site.com/this.is.a.test/another.test
To: http://www.my-site.com/index.cfm/this.is.a.test/another.test
Anyone who has an idea why it won't do this? (quick note: a ColdFusion error may occur when executing the correct URL, but I wouldn't think this would cause problems with rewriting?)
Note, it does actually work when you try the same in a browser (with the rule disabled) - just not with a rewrite rule. With the rewrite rule, cgi.PATH_INFO variable in CF returns empty string.
Also, IIS does say it has rewritten the URL to index.cfm/this.is.a.test/another.test in the logs, which is strange. Using a 301 redirect instead of a rewrite makes it work perfectly fine (did not change anything about the rule, only action type to redirect). THis is to me, very strange, since I would expect rewriting to work pretty much the same as redirecting, just the difference that rewriting is internal.
We have Helicon Ape on our server as well, so if you have a solution for this in mod_rewrite instead of IIS' module, please suggest it.
The issue was that we needed to re-do the Configuration Tool of Coldfusion 10 after we applied the new update 11 yesterday. It's working now.