how best practice setup project rakit with dynamic subdomain? #36
Answered
by
esyede
wznuhidayat
asked this question in
Diskusi Umum
-
saya mau setup projek dimana projek tersebut memakai dynamic subdomain |
Beta Was this translation helpful? Give feedback.
Answered by
esyede
Oct 11, 2024
Replies: 2 comments
-
Hello, dynamic subdomain and subdomain routing are not supported at the moment. So I'm afraid you need to do some tweaks on your 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. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wznuhidayat
-
thanks for your answer, i will try it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 :Note that the above snippets are untested, so you certainly need to test and adjust it yourself.