Apache由http自动跳转到https的方法
修改根目录.htaccess文件Options +FollowSymlinks
RewriteEngine On
#thinkphp去掉index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1
#http自动跳转到https
RewriteCond %{SERVER_PORT} !^443$
#只有匹配对应的域名才会跳转
RewriteCond %{SERVER_NAME} ^jenny.party|www.jenny.party$
RewriteRule (.*) https://%{SERVER_NAME}/$1
#不带www自动跳转到带www
RewriteEngine On
RewriteCond %{http_host} ^hrsc.cc
RewriteRule ^(.*)$ https://www.hrsc.cc/$1
页:
[1]