2

所以我有一台新笔记本电脑,并将我所有的东西都从旧笔记本电脑上移过来。遇到了几个问题,但除了 URL 重写之外,我能够克服它们。我在 Windows 7 pro 64bit、Adobe ColdFusion 10 update 13、FW/1 2.2 和 IIS 7 上,带有 URL Rewrite。这一切都在旧笔记本电脑上运行良好,一个显着的区别是 Adob​​e ColdFusion 9。

该网站不在根目录中,它是一个子文件夹“CCC”。

这是我的 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>

也试过这个:

<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>

和这个

<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>

目前,无论我单击哪个链接,它都会将我带到主要的默认页面。以下是一些示例链接。

  • 开发/ccc/项目/仪表板/
  • 开发/ccc/项目/id/15
  • 开发/ccc/联系人/

如果我将 index.cfm 添加到上面的链接中,它可以正常工作。

  • 开发/ccc/index.cfm/project/dashbord/
  • 开发/ccc/index.cfm/project/id/15
  • 开发/ccc/index.cfm/contact/

我可能错过了 Windows 7 Pro 64 位、IIS、ColdFusion(加倍)或 FW/1(加倍)的其他设置吗?非常感谢任何建议。

4

1 回答 1

1

卸载并重新安装 ColdFusion IIS 连接器。这是大多数更新所需的手动步骤,但被许多人忽视。它可能会导致您现在看到的相同问题。

最简单的方法之一是运行以下两个批处理文件。根据您安装 ColdFusion 的位置,它们在您计算机上的位置可能会有所不同。

C:\ColdFusion10\cfusion\bin\connectors\Remove_ALL_connectors.bat
C:\ColdFusion10\cfusion\bin\connectors\IIS_connector.bat
于 2014-08-22T13:44:15.260 回答