RE: [coldbox:10932] Can a hybrid web app be built?

I don’t know what you mean by a “none mvc app”, but I assume you have the two following basic options:

Option 1:

Change to URLs to something like

and then create two routes accordingly.

Option 2

Route all requests to the same handler and look for an app or a user with that name at run time and decide which one the is being requested. If a username is the same as one of your app names, you’ll need to decide which one takes precedence.

In both cases, I’m assuming you have a rewrite rule that adds index.cfm back in and that all requests are processed by ColdFusion (as opposed to some other rewrite engine)

You could do this entirely with a rewrite engine if the routes were all static, but I assume they are not and need to be dynamic and based on a database.

Does that answer your question?




URL Rewriting will allow you to do all sorts of funky stuff. Just list your known apps first in your rewrite rules in IIS, Apache or any other solution.

Incoming: → rewrite to →
Incoming: → rewrite to →

Incoming: → rewrite to →

Then, you can use a general mapping to pass all other requests to your MVC ColdBox Application.
Incoming: → rewrite to →

So long as you have difference Application.cfc/cfm files in your /apps/app1 directory you will not be bound to the ColdBox framework. This is the same solution presented by Brad but you don’t need to organize your URLs into categories like /user/*** or /apps/***.


Thank you guys for your input. Got some more Q's or clarifications.

- By a none mvc app, I mean a traditional app that is not using any
- These apps have their own Application.cfc's
- No user will share the same name as the app dir
- users will need to access their profile via
- Users profile page is dynamically generated from the database
- Hosted on IIS 7.5

Just a recap, one option is to have the apps located in an apps folder

Then add a ReWrite rule that takes to

But if the applications will not have the same name as the users, then
the applications can stay in the wwwroot folder, then add a static
route to each app, right?

So, for me to have SES url's and have user profiles be accessed via, I'll have to implement


Question: Supposing that the contact page is found in
contact it would mean that no user or application should be named
'contact' right?

While this is so, how will coldbox know if it is a page or if it is a
username or user profile? Will I need to add a route for each page
then dynamically route the rest to load the user profile.

Would this be the way forward?:
- No username or page or app should share the same name
- Statically route apps & pages
- dynamically route the rest to user profiles

Sounds like you got the idea.

Yes, as long as your application is in /whatever-your-app-is-called and that directory has its own Application.cfc AND your rewrite rules check to make sure there is not a physical directory before rewriting to /index.cfm your applications should work just fine.

Also, I contributed an interceptor to the community about 2 years ago to help solve the problem of usernames matching your application name. You can download the reserved routes interceptor here and read the blog post here: Implementing this will help you avoid usernames that match your static routes (like /contact or /app1).

-Aaron Greenlee

Hi Aaron, I am learning the interceptor, and was looking at your post and the coldbox forgebox, but I could not find the reservedRoutes.cfc file and it shows 404 error…i am missing anything? Thanks for your help and contributions! -Tony

That is no good!

This Forgebox download has gone missing:

Hopeful, it is isolated.

Aaron, that points to a code depot in svn I think that does not exist. Did you have this elsewhere?


Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager: