title: SES problems with IIS 7.5 and ColdFusion 10
body: <p>I've got a site built using <a href="http://www.coldbox.org/" rel="nofollow">ColdBox</a> and am trying to remove the /index.cfm/ from the URL. I have this working great on ColdFusion 9 running on IIS7 using the below web.config file, but can't for the life of me get it to work on CF10/IIS7.5. The rewrite module is installed and SES URLs that include index.cfm (i.e. index.cfm/product/1) work just fine. I know CF10 now runs on Tomcat instead of JRun and that out of the box Tomcat doesn't support SES URLs, but from what I understand, the CF team explicitly added support for them (and indeed checking the web.xml file shows that to be true.) I really don't believe this is a ColdBox specific issue, but rather something between CF10/Tomcat and IIS7.5.</p>
  
  <p>NOTE: I don't have direct access to the web server, but am working with the hosting provider. I'm also not an IIS pro by any stretch of the imagination. And lastly, no, Apache is not an option - trust me, I wish it were otherwise ;-)</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
  &lt;system.webServer&gt;
      &lt;defaultDocument&gt;
          &lt;files&gt;
              &lt;clear /&gt;
              &lt;add value="index.cfm" /&gt;
              &lt;add value="Default.htm" /&gt;
              &lt;add value="Default.asp" /&gt;
              &lt;add value="index.htm" /&gt;
              &lt;add value="index.html" /&gt;
              &lt;add value="iisstart.htm" /&gt;
              &lt;add value="default.aspx" /&gt;
          &lt;/files&gt;
      &lt;/defaultDocument&gt;
      &lt;rewrite&gt;
          &lt;rules&gt;
              &lt;rule name="SQL Injection - EXEC" stopProcessing="true"&gt;
                  &lt;match url="^.*EXEC\(@.*$" /&gt;
                  &lt;action type="CustomResponse" url="/includes/templates/404.html" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /&gt;
              &lt;/rule&gt;
              &lt;rule name="SQL Injection - CAST" stopProcessing="true"&gt;
                  &lt;match url="^.*CAST\(.*$" /&gt;
                  &lt;action type="CustomResponse" url="/includes/templates/404.html" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /&gt;
              &lt;/rule&gt;
              &lt;rule name="SQL Injection - DECLARE" stopProcessing="true"&gt;
                  &lt;match url="^.*DECLARE.*$" /&gt;
                  &lt;action type="CustomResponse" url="/includes/templates/404.html" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /&gt;
              &lt;/rule&gt;
              &lt;rule name="SQL Injection - DECLARE%20" stopProcessing="true"&gt;
                  &lt;match url="^.*DECLARE%20.*$" /&gt;
                  &lt;action type="CustomResponse" url="/includes/templates/404.html" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /&gt;
              &lt;/rule&gt;
              &lt;rule name="SQL Injection - NVARCHAR" stopProcessing="true"&gt;
                  &lt;match url="^.*NVARCHAR.*$" /&gt;
                  &lt;action type="CustomResponse" url="/includes/templates/404.html" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /&gt;
              &lt;/rule&gt;
              &lt;rule name="SQL Injection - sp_password" stopProcessing="true"&gt;
                  &lt;match url="^.*sp_password.*$" /&gt;
                  &lt;action type="CustomResponse" url="/includes/templates/404.html" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /&gt;
              &lt;/rule&gt;
              &lt;rule name="SQL Injection - xp" stopProcessing="true"&gt;
                  &lt;match url="^.*%20xp_.*$" /&gt;
                  &lt;action type="CustomResponse" url="/includes/templates/404.html" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /&gt;
              &lt;/rule&gt;
              &lt;rule name="Application Adminsitration" stopProcessing="true"&gt;
                  &lt;match url="^(.*)$" /&gt;
                  &lt;conditions logicalGrouping="MatchAll"&gt;
                      &lt;add input="{SCRIPT_NAME}" pattern="^/(.*(CFIDE|cfide|CFFormGateway|jrunscripts|railo-context|fckeditor)).*$" ignoreCase="false" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="None" /&gt;
              &lt;/rule&gt;
              &lt;rule name="Flash and Flex Communication" stopProcessing="true"&gt;
                  &lt;match url="^(.*)$" ignoreCase="false" /&gt;
                  &lt;conditions logicalGrouping="MatchAll"&gt;
                      &lt;add input="{SCRIPT_NAME}" pattern="^/(.*(flashservices|flex2gateway|flex-remoting)).*$" ignoreCase="false" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Rewrite" url="index.cfm/{PATH_INFO}" appendQueryString="true" /&gt;
              &lt;/rule&gt;
              &lt;rule name="Static Files" stopProcessing="true"&gt;
                  &lt;match url="^(.*)$" /&gt;
                  &lt;conditions logicalGrouping="MatchAll"&gt;
                      &lt;add input="{SCRIPT_NAME}" pattern="\.(bmp|gif|jpe?g|png|css|js|txt|pdf|doc|xls)$" ignoreCase="false" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="None" /&gt;
              &lt;/rule&gt;
              &lt;rule name="RESTful Applications (not working yet)" stopProcessing="true"&gt;
                  &lt;match url="^(.*)$" /&gt;
                  &lt;conditions logicalGrouping="MatchAll"&gt;
                      &lt;add input="{SCRIPT_NAME}" pattern="^/(.*(rest)).*$" ignoreCase="false" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="None" /&gt;
              &lt;/rule&gt;
              &lt;rule name="Insert index.cfm" stopProcessing="true"&gt;
                  &lt;match url="^(.*)$" ignoreCase="false" /&gt;
                  &lt;conditions logicalGrouping="MatchAll"&gt;
                      &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
                      &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Rewrite" url="index.cfm/{PATH_INFO}" appendQueryString="true" /&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
      &lt;/rewrite&gt;
  &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>