Support the ongoing development of Laravel.io →
Authentication Requests Session

Hello Guys I have a mulisite like project in which I want to run user account on subdomain for example instead of example.com/user it should be user.example.

Now I already configured wild card sub domain and virtual host for wild card sub domain so I am not getting 404 page on user.example.com.

Laravel does have a subdomain routing Now I need that as soon as user logs in with their credentials they should be redirected to their sub domain page I will store this domain information in database.

IF another user visit that link they should be redirected to their subdomain.

What should be good way to go about this htaccess or laravel routing.

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

adammalle adammalle Joined 28 Sep 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.