Dinu

My workshop….

Extensionless Browsing with IIS7

If we need to extension less browsing in ColdFusion with  IIS7, its possible if  URL Rewrite engine is installed. We can use the following code to browse the page without extension (without ‘.cfm’).  For Implementing this add the below piece of code to the web.config file.

<rewrite>
<rules>
<rule name=”CfmRemoved”>
<match url=”.*” />
<conditions>
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true”  />
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
<add input=”{URL}” pattern=”(.*)\.(.*)” negate=”true” />
</conditions>
<action type=”Rewrite” url=”{R:0}.cfm” />
</rule>
</rules>
</rewrite>

February 1, 2012 Posted by | Coldfusion | , | Leave a comment