URL重写问题,cfm到.net

URL重写问题,cfm到.net,.net,redirect,url-rewriting,coldfusion,.net,Redirect,Url Rewriting,Coldfusion,我正在寻找重定向 somewebsite.tld/oldpage.cfm?Query=505050 到 我做了以下几件事 在web.config中,我添加了一个处理程序来处理.cfm请求 <system.webServer> <handlers> <add name="ColdFusion" path="*.cfm" verb="*" type="System.Web.StaticFileHandler" resourceType="Unspecified"

我正在寻找重定向

somewebsite.tld/oldpage.cfm?Query=505050

我做了以下几件事

在web.config中,我添加了一个处理程序来处理.cfm请求

<system.webServer>
 <handlers>
  <add name="ColdFusion" path="*.cfm" verb="*" type="System.Web.StaticFileHandler" resourceType="Unspecified" preCondition="integratedMode" />
 </handlers>
</system.webServer>

我添加了以下ewrite规则,但它不起作用

<rewrite>
 <rules>
  <rule name="Redirect oldpage.cfm" stopProcessing="true">
   <match url="oldpage\\.cfm(\\?(\\w+)=(\\d+))" /> <action type="Redirect" url="New?ref={R:3}" appendQueryString="false" redirectType="Permanent" />
  </rule>
 </rules>
</rewrite>

我能够使用urlmapping至少按照以下规则从/View读取请求

<system.web>
 <urlMappings>
  <add url="~/oldpage.cfm" mappedUrl="~/New" />
 </urlMappings>
</system.web>


但是,这仍然无法获取查询字符串。

不确定stackoverflow editor为什么添加了额外的代码,但我的重写规则是,您无法通过
匹配查询字符串,请改为选中
。不确定stackoverflow editor为什么添加了额外的代码,但我的重写规则是,您无法通过
匹配查询字符串,请改为选中
<system.web>
 <urlMappings>
  <add url="~/oldpage.cfm" mappedUrl="~/New" />
 </urlMappings>
</system.web>