我明白了,当您输入指向主页以外页面的链接时,例如:
http://www.michaelcropper.co.uk/contact-me
www.michaelcropper.co.uk/contact-me
michaelcropper.co.uk/contact-me
如果
https://
不在前缀中,而是加载HTTP链接。将以下内容添加到
.htaccess
在
<IfModule mod_rewrite.c>
标签:
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
如果没有对您的
.htaccess
, 它应该如下所示:
# 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]
# Rewrite HTTP to HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
# END WordPress
让我知道进展如何。