XRouting is a simple plugin that handles requests for different contexts in MODX Revolution. It automatically switches the context based on a (sub)domain AND/OR subfolder.