Tuckey CF Rewriter URL Filter with ColdFusion 11

I took over the application that was built into CF Wheels in ColdFusion 10 and was developed to work on Linux. It uses the Tuckey URL Rewrite filter to clear URLs. I am trying to configure it on a Windows machine and use ColdFusion 11, but I have a problem with the Tuckey URL Rewrite filter.

The problem is that it disables m in the cfm file cfm , so ColdFusion throws a "File not found" error, because, of course, there is no "rewrite.cf" file. I also noticed in the debug output that the variable CGI.PATH_TRANSLATED ends with rewrite.cf , and CGI.PATH_INFO ends with "m / [any directory path]", so somehow the filter breaks the file name that is supposed to be rewritten. This only happens when I use the "backlinks" in the "to" section of the rewrite URL to pass the path to the rewrite.cfm directory. If I just redirect to simple cfm without making a callback, it works fine. Other rewrite rules also work fine, and the rewrite status looks good on my localhost. Does anyone have any ideas?

Below is my rule with my urlrewrite.xml and a screenshot of the confused variables PATH_TRANSLATED and PATH_INFO. Besides switching to Windows and CF 11, another difference is that I run the application in the wwwroot ("portal") subdirectory, but I applied the filter and rules at the wwwroot level and specified the directory in the rewrite rule.

 <rule> <note>Apply CFWheels URL rewriting for portal.</note> <condition type="request-uri" operator="notequal">^/portal/$</condition> <condition type="request-uri" operator="notequal">^/portal/favicon.ico$</condition> <condition type="request-uri" operator="notequal">^/portal/cfide(.*)$</condition> <condition type="request-uri" operator="notequal">^/portal/images(.*)$</condition> <condition type="request-uri" operator="notequal">^/portal/javascripts(.*)$</condition> <condition type="request-uri" operator="notequal">^/portal/stylesheets(.*)$</condition> <condition type="request-uri" operator="notequal">^/portal/rewrite.cfm(.*)$</condition> <from>^/portal/(.*)$</from> <to type="passthrough" last="true">/portal/rewrite.cfm/$1</to> </rule> 

Tuckey rewrite issue

+6
source share

All Articles