iis-7coldfusionurl-rewritingcoldfusion-10fw1

URL Rewrite not working on new laptop - Windows 7 Pro 64bit, IIS, ColdFusion 10, FW/1


So I have a new laptop and moving all my stuff over from the old one. Ran into several issues but I was able to overcome them except for the URL Rewrite. I’m on Windows 7 pro 64bit, Adobe ColdFusion 10 update 13, FW/1 2.2, and IIS 7, with URL Rewrite. This all worked fine on the old laptop, one notable difference is Adobe ColdFusion 9.

The website is not in the root directory, it's a sub folder “CCC”.

Here is my web.config.

<configuration>
<system.webServer>
<rewrite>
  <rules>
    <rule name="FW/1 URL Rewriting" enabled="true">
      <match url="^(.*)$" ignoreCase="true" />
        <conditions>
          <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        </conditions>
      <action type="Rewrite" url="/ccc/index.cfm/{R:1}" />
    </rule>
  </rules>
</rewrite>
</system.webServer>
</configuration>

Also tried this:

<rule name="Imported Rule 1" stopProcessing="true">
   <match url="^(.*)$" />
    <conditions logicalGrouping="MatchAll">
      <add input="{REQUEST_FILENAME}" pattern="^((?!\.).)*$|(\.cfm)$" />
      <add input="{URL}" matchType="Pattern" pattern="/(assets|scratch|remote|index.cfm|extensions)" ignoreCase="true" negate="true" />
    </conditions>
   <action type="Rewrite" url="/ccc/index.cfm/{R:1}" appendQueryString="true" />
</rule>

And this

<rule name="Insert index.cfm" stopProcessing="true">
  <match url="^(.*)$" ignoreCase="false" />
   <conditions logicalGrouping="MatchAll">
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
   </conditions>
  <action type="Rewrite" url="/ccc/index.cfm/{PATH_INFO}" appendQueryString="true" logRewrittenUrl="true" />
</rule>

Currently no matter what link I click it takes me to the main default page. Here are some sample links.

If I add the index.cfm to the links above it works fine.

Is there any additional setting for Windows 7 Pro 64bit, IIS, ColdFusion (double it), or FW/1 (double it) I may have missed? Any suggestions are greatly appreciated.


Solution

  • Uninstall and reinstall the ColdFusion IIS connectors. This is a manual step required by most of the updates and is overlooked by many people. It can cause the same issue you're seeing now.

    One of the easiest ways to do it is to run the following two batch files. Their location on your computer may be different based on where you installed ColdFusion.

    C:\ColdFusion10\cfusion\bin\connectors\Remove_ALL_connectors.bat
    C:\ColdFusion10\cfusion\bin\connectors\IIS_connector.bat