I want to select a different database for the user to access depending on the URL they use to access the app. One client might use xxx.domain.com, another might use anotherdomain.com and yet another might use subdomain.anotherdomain.com.
These are to be custom domains and i will maintain a table of domain -> database mappings, so how to I get the domain they entered in their browser?
EDIT -
actually, this is nonsense.
I have to create a new app for each one anyway to enter the custom domain. So a new app would be the facade selecting the database, and the rest of the code would be included (dependencies) from a core app.