-
How to create a subdomain for each user. Users have the unique username. Like wordpress
-
How to direct
username.domain.com
to a user profile.
In my opinion
-
sub.domain.com to root // .httaccess
-
get subdomain and redirect to domain.com/users/username // cakephp
$subdomain = $request->subdomains(1);
$routes->connect(
’/’.$subdomain,
[‘controller’ => ‘usrers’, ‘action’ => ‘view’, $subdomain]
);
I am not sure it is correct way.