Skip to content
Discussion options

You must be logged in to vote

Hello, dynamic subdomain and subdomain routing are not supported at the moment. So I'm afraid you need to do some tweaks on your .htaccess or nginx config file. Something like :

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} ^(www\.)?mywebsite\.com$
RewriteRule ^(.*)$ /index.php/$1 [END,QSA]

RewriteCond %{HTTP_HOST} !^www
RewriteCond %{HTTP_HOST} ^([a-z0-9-]+)\.mywebsite\.com$ [NC]
RewriteRule ^(.*)$ /index.php/users/%1/$1 [END,QSA]
// routes.php
Route::get('users/(:all)', 'user@index');

Note that the above snippets are untested, so you certainly need to test and adjust it yourself.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by wznuhidayat
Comment options

You must be logged in to vote
1 reply
@esyede
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants