Where to catch sub-domains?

Say you had blog.domain.com or any wild-card sub, and when the request
comes into to coldbox, where would you catch it and say 'if
blog.domain.com setNextEvent('blog)' ? and possibly just forward the
browser to www.domain.com/blog

If you need to have ColdBox check something first, then put it in your onRequestStart() method (e.g. main controller, onrequeststart). Otherwise, handle it in your App.cfc’s onRequestStart().


Are you using SES at all?

You could do It in there, and redirect if the subdomain matches the rule.


Andrew Scott


Yes, I would use a preprocess interceptor that converts and detects the subdomain first and maybe place it in the request collection. Then let the normal ses routes take hold or redirect to a module.

Luis F. Majano
Ortus Solutions, Corp

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

Thanks guys, I had totally forgotten about the 'main.cfc' >.>