My site currently works with http://site.com/index.cfm/main/manage
I want to remove the "index.cfm" from the URL to use http://site.com/main/manage
.
After some searching this is what I came up with (from
http://cfwheels.org/docs/chapter/url-rewriting#comment-83)
RewriteEngine On
RewriteRule (^/(assets|flex2gateway|jrunscripts|cfide|cfformgateway|
railo-context|robots.txt|sitemap.xml|rewrite.cfm|404.cfm)($|/.*$)) $1
[L,NC]
RewriteRule ^/(.*)$ /index.cfm/$1 [NC,L]
But when I try to load the URL http://site.com/main/manage - I see the
"main.default" action instead and the URL is /404.cfm?404;http://
site.com:80/main/manage
It looks like IIS's error handler is kicking in even if the index.cfm
file exists and it works just fine with /index.cfm/main/manage
Any clues on what's happening?
Both the index.cfm and 404.cfm files exist and the missing template
handler is set to /404.cfm in CFAdmin. The variables.framework.error
in my application.cfc is set to "main.error" so I am not sure why it
is going to the /404.cfm.
I was also wondering if it is possible to handle the errors with a
template as Ray explains on his site:
http://www.coldfusionjedi.com/index.cfm/2007/12/5/The-Complete-Guide-to-Adding-Error-Handling-to-Your-ColdFusion-Application
or to be more specific to handle the errors using the "onError"
function. I tried it but it didn’t seem to take effect. Does the
variables.framework.error try to handle all conditions?
Thanks for looking into this.
Move your 404.cfm file to a subdirectory and add an Application.cfc
with the same this.name setting (but do not extend framework.cfc).
Then update your paths to that subdirectory so 404.cfm is no longer
intercepted by FW/1.
Sean
--
You received this message because you are subscribed to the Google Groups "framework-one" group.
To post to this group, send email to framew...@googlegroups.com.
To unsubscribe from this group, send email to framework-on...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/framework-one?hl=en.
I almost gave up on this but it turns out there was an issue with the
ISAPI rewrite and the IIS was looking for the /404.cfm as the custom
404.cfm page. It was testing with another site that finally made me
spot the difference.
I didn't need the beginning "/" in my ISAPI rules.
i.e.
RewriteEngine On
RewriteRule (^(assets|flex2gateway|jrunscripts|cfide|
cfformgateway| railo-context|robots.txt|sitemap.xml|rewrite.cfm|
404.cfm)($|/.*$)) $1 [L,NC]
RewriteRule ^(.*)$ /index.cfm/$1 [NC,L]
Switching to Apache is tempting but my company has been immersed in
IIS for years and I would have a hard time convincing the switch to
Apache and all involved (including myself) are used to IIS' GUI.
I still am not quite sure on how to activate the 404.cfm in the sub-
directory but I will play around with it and figure it out.
> > On Tue, Mar 30, 2010 at 01:25, Sean Corfield <seancorfi...@gmail.com>wrote:
>
> >> FW/1 intercepts ALL cfm requests covered by the same Application.cfc.
>
> >> Move your 404.cfm file to a subdirectory and add an Application.cfc
> >> with the same this.name setting (but do not extend framework.cfc).
> >> Then update your paths to that subdirectory so 404.cfm is no longer
> >> intercepted by FW/1.
>
> >> Sean
>
> >> --
> > You received this message because you are subscribed to the Google Groups
> > "framework-one" group.
> > To post to this group, send email to framew...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > framework-on...@googlegroups.com<framework-one%2Bunsu...@googlegroups.com>