I want to create a network like stackexchange just with subdomains.
for example
subdomain1.test.com
subdomain2.test.com
subdomain3.test.com
subdomain4.test.com
I also want to have all websites in one app so I can scale and service them easier.
How do I do this in play2?
Can i specify a subdomain in routes?
pseudo code
GET subdomain1/ controllers.Application.index()
GET subdomain2/ controllers.Application.index()
It will not work: if
routercontains two routes with the same type and target action it will use only first. For fastest solution you can just create a wrapping method(s), which will do what you need and use them on the view/controller level:routeApplication controllerTemplate samples: