我已经设置了一个通配符子域*.domain.com&我正在使用以下.htaccess:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !www\.
RewriteCond %{HTTP_HOST} (.*)\.domain\.com
RewriteRule .* index.php?username=%1 [L]
Run Code Online (Sandbox Code Playgroud)
一切都很完美.
我想在laravel中实现这个方法.主要是我想在访问username.domain.com时显示我的用户个人资料.实现这一目标的任何想法?