I am looking to redirect
somewebsite.tld/oldpage.cfm?Query=505050
to
somewebsite.tld/New?ref=505050
I've done the following
In web.config I've added a handler to handle the .cfm request
<system.webServer>
 <handlers>
  <add name="ColdFusion" path="*.cfm" verb="*" type="System.Web.StaticFileHandler" resourceType="Unspecified" preCondition="integratedMode" />
 </handlers>
</system.webServer>
I've added the following ewrite rule but it does not work.
<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>
I was able to use a urlmapping to at least read a request from /View with the following rule.
<system.web>
 <urlMappings>
  <add url="~/oldpage.cfm" mappedUrl="~/New" />
 </urlMappings>
</system.web>
However this still does not grab the query string.