Skip to main content
Participant
March 31, 2022
Question

301 Redirect with dynamic url

  • March 31, 2022
  • 1 reply
  • 107 views

Hi,

We are trying to accept old inbound links, that are currently bouncing.

The old urls contain: /County_Detail.cfm/CountyID:XXX   (XXX = UniqueID)

We want the old links to redirect to /Counties/County_Detail.cfm?CountyID=XXX

We're using CF10 and IIS 8.5

We simply want to replace the delimiters / and :

 

We've tried a number of settings, with the following as the latest. 

Would someone kindly point out the error of our ways.

<rewrite>
<rules>
<rule name="Rewrite Counties" stopProcessing="true">
<match url="^County_Detail.cfm([a-zA-Z0-9-+]+)CountyID([a-zA-Z0-9-+]+)" />
<action type="Redirect" url="County_Detail.cfm{R:1}CountyID{R:2}" />
</rule>
</rules>
</rewrite>

 

Thank you, so much!

 

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    April 1, 2022

    Your question itself contains some unanswered questions:

    • What kind of characters does UniqueID contain?
    • The old URL contains /County_Detail.cfm, but the new URL contains /Counties/County_Detail.cfm. Does the old URL contain /Counties/ as well?