ColdBox app in subdir of main (non-CB) app?

I'm writing a new Admin area for a client's website... an old, dated,
legacy, homebrew-CMS app. It lives in a subdir of the webroot, called
(for the sake of this post), admin2. It's in ColdBox 3.

But, when I try to go there... e.g. www.website.com/admin2, I get a CF
error thrown from the Application.cfm of the main site complaining
about a pathing problem... which makes sense on one hand, but on the
other, it should be leaving things alone and letting the app live on
its own.

What's needed to make this work? I was just going to setup a cname
and then redirect the old /admin path to the new name, e.g.
admin.website.com. BUT, the ISP is a pain in the butt to deal with
and doesn't want to do that for us. It could be accomplished in IIS
in a matter of seconds with a mapping or virtual dir, but explaining
that to these people is like trying to explain brain surgery to a
monkey.

Is there any way to avoid that and just have it live peacefully in the
subdir?

Thanks.

Rob

Use custom mappings in your Application.cfc/.cfm

Maybe the main app has rewrites?

How do you do this? :slight_smile:

Thanks.

Rob

That’s a CF thing.

this.mappings["/name"] = absolute path

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Hey... so where specifically in Coldbox do I put this mapping? I used
it in another project and put it in the onRequest() method in
Application.cfc and it worked great. I tried that in Coldbox's
Application.cfc and it complains that Element MAPPINGS is undefined in
THIS (I had to add an onRequest() method). I get the same error if I
move it up into the onRequestStart() method.

I even moved it up higher in the file under the other "this" settings
just below the cfcomponent tag and again got the same error.

Rob

This has nothing to do with ColdBox Rob, this is plain ColdFusion. It should be done in the Application.cfc usually before any methods in the pseudo-constructor.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Yeah I realize that. I was just wondering where it belonged in a CB
application. Thanks... I put it where you suggested.

Rob