您最好不要使用插件并编辑。htaccess文件(在网站的根目录中)顶部类似于以下内容:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^somesite.com [NC]
RewriteRule ^(.*)$ https://www.somesite.com/$1 [L,R=301]
所以你的。htaccess文件可能如下所示:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^somesite.com [NC]
RewriteRule ^(.*)$ https://www.somesite.com/$1 [L,R=301]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
记住在WordPress admin(设置->常规)中设置WordPress地址(URL)和站点地址(URL),以便它们位于https而不是http上