Add NS (No Sub requests) to the last rewrite rule should solve it
RewriteRule ^(.*)$ index.cfm?course=%{REQUEST_URI} [NS,QSA,L]
>I've found an issue with mod_rewrite and expandPath() recently and
>I'm wondering if anyone has a solution. It seems that Coldfusion
>uses Apache to pull the directory information with expandPath().
>This is the case on Linux (CentOS and SUSE 10), at least, since I
>can't duplicate the problem on my Mac.
>
>For example, I have the following rewrite rules:
>
>RewriteEngine on
>#General Rewrites
>RewriteRule ^$ index.cfm [QSA]
>RewriteRule ^([^.]+)$ $1.htm [QSA]
>#Escape if file or directory exists
>RewriteCond %{REQUEST_FILENAME} !-f
>RewriteCond %{REQUEST_FILENAME} !-d
>#Redirect all other requests through index.cfm
>RewriteRule ^(.*)$ index.cfm?course=%{REQUEST_URI} [QSA,L]
>
>The the two RewriteCond rules escape the redirect when a file or
>directory exists however when using <cffile action write=""> where an
>expandPath is used to create the file path, Coldfusion returns the
>path "redirect:index.cfm" as the expanded path instead - since the
>file doesn't exist yet .
>
>The workaround is to modify every path variable to two separate
>variables - one for the directory and one for the file name and then
>combine the two in the <cffile> tag: Not a big deal, except that one
>of the apps is a decent sized app with a bunch of file operations
>being done in legacy code (in different directories) where I keep
>running into this issue.
>
>Any idea of a rewrite rule or workaround that will allow CF (and
>expandPath()) to do it's thing in peace while allowing all other
>rewrite rules to be processed? I've been digging into the
>mod_rewrite book and trying to tweak the existing rules with no success.
>
>Thanks,
>Jon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297248
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4