修改根目錄.htaccess文件
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
#thinkphp去掉index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
#http自動跳轉到https
RewriteCond %{SERVER_PORT} !^443$
#只有匹配對應的域名纔會跳轉
RewriteCond %{SERVER_NAME} ^jenny.party|www.jenny.party$
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R]
#不帶www自動跳轉到帶www
RewriteEngine On
RewriteCond %{http_host} ^hrsc.cc [NC]
RewriteRule ^(.*)$ https://www.hrsc.cc/$1 [L,R=301]
</IfModule>