FW/1 SES w/ IIS 7.5 URL Rewrite

I am trying to implement REST with ColdFusion FW/1. However I was always getting a 404 error. So I decided that URL Rewriting needed to be setup on the server to handle those type of requests.

I was able to find information on rewrites for Apache, but nothing for the IIS URL Rewrite module.

Here’s what I was able to come up with and it appears to work pretty good. (this is from web.config)

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
                    <match url="^(.*)$" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="/index.cfm/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

and this is what should be in your Application.cfc:

component extends="org.corfield.framework" {

	variables.framework = {
		generateSES = true,
  		SESOmitIndex = true
	};

}

#coldfusion-2, #fw1, #url-rewriting