通过IIS URL重写删除index.cfm
如果没有查询字符串,我想删除URL中的index.cfm,例如通过IIS URL重写删除index.cfm,iis,coldfusion,iis-7,iis-7.5,coldfusion-10,Iis,Coldfusion,Iis 7,Iis 7.5,Coldfusion 10,如果没有查询字符串,我想删除URL中的index.cfm,例如www.mysite.com/index.cfm将被重写为www.mysite.com,'www.mysite.com/Test/index.cfm将被重写为'www.mysite.com/Test/,但如果URL中有查询字符串,则URL不会受到影响e、 g.'www.mysite.com/Test/index.cfm?u=5不受重写规则的影响 我怎样才能得到它?这对我来说非常合适 <rule name="Default Doc
www.mysite.com/index.cfm
将被重写为www.mysite.com
,'www.mysite.com/Test/index.cfm
将被重写为'www.mysite.com/Test/
,但如果URL中有查询字符串,则URL不会受到影响e、 g.'www.mysite.com/Test/index.cfm?u=5
不受重写规则的影响
我怎样才能得到它?这对我来说非常合适
<rule name="Default Document" stopProcessing="true">
<match url="(.*)index.cfm" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{PATH_INFO}" pattern="^.*(/index.cfm/).*$" negate="true" />
<add input="{QUERY_STRING}" pattern=".+" ignoreCase="false" negate="true" />
</conditions>
<action type="Redirect" url="{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
改用
www.mysite.com/Test/?u=5
怎么样?