【问题标题】:URL Rewrite not working on new laptop - Windows 7 Pro 64bit, IIS, ColdFusion 10, FW/1URL 重写在新笔记本电脑上不起作用 - Windows 7 Pro 64bit、IIS、ColdFusion 10、FW/1
【发布时间】:2014-10-15 19:18:57
【问题描述】:

所以我有一台新笔记本电脑,并将我所有的东西都从旧笔记本电脑上移过来。遇到了几个问题,但除了 URL 重写之外,我能够克服它们。我使用的是 Windows 7 pro 64 位、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>

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

  • dev/ccc/project/dashbord/
  • dev/ccc/project/id/15
  • dev/ccc/contact/

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

  • dev/ccc/index.cfm/project/dashbord/
  • dev/ccc/index.cfm/project/id/15
  • dev/ccc/index.cfm/contact/

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

【问题讨论】:

  • 您是否尝试过再次运行 ColdFusion Web 连接器?
  • 还可以查看 FW/1 wiki 上关于 SES URL 的讨论 - github.com/framework-one/fw1/wiki/Helpful-Links#url-rewrites
  • 感谢您的回复,我将按照 Brad Wood 下面提供的说明进行尝试。感谢 FW/1 引用链接。
  • 卸载并重新安装 ColdFusion IIS 连接器,再次感谢您的回复。

标签: iis-7 coldfusion url-rewriting coldfusion-10 fw1


【解决方案1】:

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

最简单的方法之一是运行以下两个批处理文件。它们在您计算机上的位置可能因您安装 ColdFusion 的位置而异。

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

【讨论】:

  • 感谢您的回复,我会尽快尝试并告诉您结果。
猜你喜欢
  • 1970-01-01
  • 2020-09-27
  • 2012-12-23
  • 2016-07-03
  • 1970-01-01
  • 1970-01-01
  • 2019-02-16
  • 1970-01-01
  • 2023-03-08
相关资源
最近更新 更多