Is it possible to use a different reference CFM fi...
# box-products
p
Is it possible to use a different reference CFM file for using Coldbox? For my existing site, I have a base
index.cfm
file already in place. While I’m trying to write my
onRequestStart
method to figure out whether or not CB should process the request, I’m running into some very weird redirection issues. I was wondering if by hitting
https://<site>/coldbox.cfm?event=…
that I could filter that way…
r
Interesting question. I dont think this is possible. Looking at the coldbox source code it seems the framework will only process the request if the targetpage is index.cfm
This is the coldbox onRequestStart 'override'.
@lmajano
p
Right I saw that as well. But, since I already have an Application.cfc file with my
onRequestStart
method, I could just call
application.cbBootstrap.processColdBoxRequest()
directly. At least that seems like it would work…
That’s more similar to @bdw429s’s demo that I was using as that reference…
r
Gotcha, I would be interested in your solution if you find one.
prehaps someone with more coldbox chops could comment 🙂
p
Agreed…
b
Yeah, all you need to do is bypass or override that onRequestStart method and call processColdBoxRequest() direct
I'd question why you want it to be
coldbox.cfm
however. Chances are, you can figure out what you need using index.cfm
p
I guess if my CF and Coldbox-fu were stronger, yes. I almost having things working, but when I have even the old style of
/index.cfm?event=main.test
, it’s trying to redirect to something back and forth so much by browser stops. When I’ve tried
/index.cfm/main/test
it tries to send me to
/index.cfm/main/index.cfm
. So something is up and I was trying to figure out what’s happening…
b
Neither the redirect or the rewrite is ColdBox, that's something you've set up on your server
p
Hm. OK. Will have to check Commandbox server setup…