Closed daniesy closed 4 years ago
There is no support today. It would be possible to add it though. Basically a mapping of domains (user names for example) to different sub-directories under the root. Is that what you are looking for?
Thanks for the fast answer! Laravel (PHP) has a good explanation and some examples here: https://laravel.com/docs/5.8/routing#route-group-sub-domain-routing
Route::domain('{account}.myapp.com')->group(function () {
Route::get('user/{id}', function ($account, $id) {
//
});
});
TL;DR: they group routes from a wildcard subdomain and pass that subdomain's value as a parameter to the handler function.
So the only difference between what I proposed and the Laravel docs are that I suggested the path would be under root. removing that restriction would provide the same functionality I believe but different declaration syntax.
Yep, you're right.
This feature will go into Agoo first and then immediately after into Agoo-C. They share most of the same code. I am working on it. :-)
Finally started working on subdomain support.
Please take a look at the domains
branch. I still have to run some regression tests before releasing but I believe it is ready for testing. Unit tests in the Agoo repo pass.
No response. Feature added in v2.9.0.
Hey, I'm playing with the server and i quite like it (even though i haven't coded in C since uni). I have a question though: Is there any support for Sub-Domain Routing?