http强制转https wordpress Cpanel

走了一些弯路,最容易忽略的点:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www.)?yoga.dog
RewriteRule ^(.*)$ https://yoga.dog/$1 [R,L]

(1)不要空行
RewriteCond
RewriteRule 要紧跟着
RewriteEngine On

附上资料参考: (很多个人博客没讲到点上)
https://tw.godaddy.com/help/cpanellinux-https-27870

Leave a Reply

Your email address will not be published. Required fields are marked *