@
lslqtz 我现在的 htaccess 是网上找的,不过是全部跳转到带 www 的 https 地址,我是不想要 www 来着。。
RewriteEngine on
RewriteCond %{HTTP:KERSSL} !on
RewriteCond %{HTTP_HOST} ^
example.com [NC]
RewriteCond %{HTTP_USER_AGENT} !MSIE/[1-8]\. [NC]
RewriteRule ^(.*)$
https://www.example.com/$1 [R=301]
RewriteCond %{HTTP:KERSSL} on
RewriteCond %{HTTP_HOST} ^
example.com [NC]
RewriteCond %{HTTP_USER_AGENT} !MSIE/[1-8]\. [NC]
RewriteRule ^(.*)$
https://www.example.com/$1 [R=301]
RewriteCond %{HTTP:KERSSL} !on
RewriteCond %{HTTP_HOST} ^
www.example.com [NC]
RewriteCond %{HTTP_USER_AGENT} !MSIE/[1-8]\. [NC]
RewriteRule ^(.*)$
https://www.example.com/$1 [R=301,L]