Wordpress Apache HTTPS重定向不适用于深度链接

Wordpress Apache HTTPS重定向不适用于深度链接,wordpress,apache,.htaccess,redirect,https,Wordpress,Apache,.htaccess,Redirect,Https,我最近更改了WordPress博客(由托管)上的.htaccess文件,将所有传入流量重定向到HTTPS端口 RewriteEngine On RewriteCond %{HTTP_HOST} ^ example\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://example.com/$1 [R,L] 当我点击http://example.com但是深度链接(如http://example.com/posts

我最近更改了WordPress博客(由托管)上的
.htaccess
文件,将所有传入流量重定向到HTTPS端口

RewriteEngine On
RewriteCond %{HTTP_HOST} ^ example\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R,L]

当我点击
http://example.com
但是深度链接(如
http://example.com/posts/1234
)以前保存的,例如在书签或Facebook帖子中,不会被重定向,并且仍然显示为不安全。有什么想法吗?

你的情况下额外的空格和替换URL是怎么回事?你确定那些不工作的URL实际上按照你的情况要求使用
example.com
作为主机名,而不是
www.example.com
。@CBroe抱歉,我的错误,我编辑了代码片段以匹配我的.htaccess