How to forward a url for legacy app?

I am building coldbox app, I need forward some request to special
folders like /pos bypass coldbox event and view, is that possible,
Thanks in advance.

URL Rewriting will do the trick.

You mean a rewrite like Andrew said or just a browser location change from coldbox code?

You can also do this in Application.cfc onRequestStart method.

Just do a reFind for ‘^(’/pos|/folder2/folder3)’ on CGI.PATH_INFO and don’t let ColdBox do it’s thing.


This is my personal site rewrite rules. I have a /blog folder where I have a blogCFC instance. Pay attention to this line, we are ignoring the /blog folder as a rewrite condition.

RewriteCond %{REQUEST_URI} ^/(.(CFIDE|cfide|CFFormGateway|jrunscripts|railo-context|mapping-tag|fckeditor|blog)).$

Thanks all, I did as Dan said, then I lost all request variables at
the special folder index.cfm. Any clue? thanks?

Request Variables or Request Context Variables?

The former is defined at runtime in your application, legacy or not so not sure what you are referring too.

The latter if this is lost in your legacy app that goes without saying, as you can’t redirect to the legacy and expect to have the RC and ColdBox setup for you.

Maybe if you explain what it is you are trying to do, what it is you want to achieve then maybe we can help you a bit further.

But by the sounds of it you are trying to mix ColdBox and legacy variables, which is kinda not going to happen unless you write a special interceptor to run ColdBox then check if it is a legacy app and then do what you need to do.

But without knowing exactly what you want to achieve most are only going to second guess that.

Sorry my wrong coding, now the request scope is working.

Thank all for your prompt reply.

To Andy’s point, what are you trying to do? In my case it wasn’t so much legacy as it was a standalone application. To me a legacy application could of meant stand alone. If your application will run on its own and has no dependency on ColdBox (and in that case no need for it) then my example will help.