明明做了301了,百度依然提示“非https链接”
最终找到了解决办法,下面两种301来回换一下,总一个会成功:

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R]

上面写法虽然能够实现将http全部跳转到https,但是在百度站长平台是通不过的。最后将代码修改为以下后便通过了

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
© 2019 Powered by Typecho & Theme Quark