小编dsp*_*spz的帖子

使用web配置从url中删除index.cfm

快速提问 -

目前我的网址看起来像这样: index.cfm/camp/another-test

我希望他们看起来像这样: camp/another-test

我可以使用我的.htaccess在apache上做到这一点,但我需要能够使用web.config在iis7上完成.到目前为止,这是我的重写:

<rewrite>
  <rules>
    <rule name="Remove index.cfm" enabled="true">
      <match url="^(.*)$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll">
        <add input="{SCRIPT_NAME}" negate="true" pattern="^/(assets|files|miscellaneous|robots.txt|favicon.ico|sitemap.xml|index.cfm)($|/.*$)" />
      </conditions>
     <action type="Rewrite" url="/index.cfm/{R:1}" />
    </rule>
  </rules>
</rewrite>
Run Code Online (Sandbox Code Playgroud)

谢谢您的帮助!

coldfusion iis-7 web-config url-rewriting cfwheels

6
推荐指数
1
解决办法
1327
查看次数

标签 统计

cfwheels ×1

coldfusion ×1

iis-7 ×1

url-rewriting ×1

web-config ×1