ilikemypizza
ilikemypizza

Reputation: 347

Coldfusion 9 & IIS7 URL Rewrite

I'm currently researching how to implement URL Rewriting and was wondering if someone could help shed some light.

Our current url structure is the following..

http://example.com/products.cfm?id=1234

http://example.com/recipes.cfm?id=6789

I would like to configure IIS so that URLs can be rewritten to the following (or similar)

http://example.com/products/1234/product-title-here

http://example.com/recipes/6789/yummy-recipe-ever

How would I go about doing this?

Upvotes: 2

Views: 1044

Answers (2)

Adrian J. Moreno
Adrian J. Moreno

Reputation: 14859

Read through this walk through. The example comes close to what you want (replaced aspx with cfm).

<rewrite>
  <rules>
    <rule name="Rewrite to article.aspx">
      <match url="^article/([0-9]+)/([_0-9a-z-]+)" />
      <action type="Rewrite" url="article.cfm?id={R:1}&title={R:2}" />
    </rule>
  </rules>
</rewrite>

Upvotes: 1

Daniel Schmid
Daniel Schmid

Reputation: 59

Look into Coldbox there is a rewrite.ini and IS7 web.config included http://wiki.coldbox.org/wiki/URLMappings.cfm

The Coldbox blog shared this link http://blog.coldbox.org/blog/coldbox-and-url-rewrites-with-iis-7

Upvotes: 1

Related Questions