if (structKeyExists(cgi,"http_x_rewrite_url") && len(cgi.http_x_rewrite_url)) // iis6 1/ IIRF (Ionics Isapi Rewrite Filter)
request.path_info = listFirst(cgi.http_x_rewrite_url,'?');
else if (structKeyExists(cgi,"http_x_original_url") && len(cgi.http_x_original_url)) // iis7 rewrite default
request.path_info = listFirst(cgi.http_x_original_url,"?");
else if (structKeyExists(cgi,"request_uri") && len(cgi.request_uri)) // apache default
request.path_info = listFirst(cgi.request_uri,'?');
else if (structKeyExists(cgi,"redirect_url") && len(cgi.redirect_url)) // apache fallback
request.path_info = listFirst(cgi.redirect_url,'?');
else // fallback to cgi.path_info
request.path_info = cgi.path_info;
// finally lets remove the index.cfm because some of the custom cgi variables don't bring it back
// like this it means at the root we are working with / instead of /index.cfm
request.path_info = replace(request.path_info,'index.cfm','');
request.cgi.path_info = request.path_info;
loc.returnValue.path_info = request.cgi.path_info;
Create a plugin for the fix. Perferred so that others caninstall it and test it out to make sure that it works.
Just override the method in the controller.cfc.
either way could you please sumbit a pull request to the github repo so we can merge it after we test it.
request.path_info = cgi.path_info;This solved the problem on MAMP on OS X Lion.
To view this discussion on the web visit https://groups.google.com/d/msg/cfwheels/-/iUwUHgZqgbgJ.--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
Hello everyone,
I’m having the trouble getting the URL rewrite to work on my laptop. I’m just installed ColdFusion 10 on Windows 7 IIS7 and found that the URL rewrite no longer works. I’ve found several related issue but none worked for me. Here's what I've tried...
<rules>
<rule name="ColdFusion on Wheels URL Rewriting"
enabled="true">
<match url="^(.*)$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{SCRIPT_NAME}" negate="true"
pattern="^/cfwheels118/(flex2gateway|jrunscripts|cfide|CFFileServlet|cfformgateway|railo-context|files|images|javascripts|miscellaneous|stylesheets|robots.txt|favicon.ico|sitemap.xml|rewrite.cfm)($|/.*$)"
/>
</conditions>
<action type="Rewrite"
url="/cfwheels118/rewrite.cfm/{R:1}" />
</rule>
</rules>
I get this error:
Could not find the view page for the index action in the Cfwheels118 controller.
When I tried Tim Badolato script:
if (structKeyExists(cgi,"http_x_rewrite_url") && len(cgi.http_x_rewrite_url)) // iis6 1/ IIRF (Ionics Isapi Rewrite Filter)
request.path_info = listFirst(cgi.http_x_rewrite_url,'?');
else if (structKeyExists(cgi,"http_x_original_url") && len(cgi.http_x_original_url)) // iis7 rewrite default
request.path_info = listFirst(cgi.http_x_original_url,"?");
else if (structKeyExists(cgi,"request_uri") && len(cgi.request_uri)) // apache default
request.path_info = listFirst(cgi.request_uri,'?');
else if (structKeyExists(cgi,"redirect_url") && len(cgi.redirect_url)) // apache fallback
request.path_info = listFirst(cgi.redirect_url,'?');
else // fallback to cgi.path_info
request.path_info = cgi.path_info;
// finally lets remove the index.cfm because some of the custom cgi variables don't bring it back
// like this it means at the root we are working with / instead of /index.cfm
request.path_info = replace(request.path_info,'index.cfm','');
request.cgi.path_info = request.path_info;
loc.returnValue.path_info = request.cgi.path_info;