【发布时间】:2011-08-05 03:59:25
【问题描述】:
我正在设置我的第一个 Wordpress 网站,但在管理员中遇到了一些 SSL 问题。我已经拿到了证书,并将define('FORCE_SSL_ADMIN', true); 添加到 wp-config.php 中的适当位置
当我通过 https 链接登录管理员时,它可以工作,但 Chrome 告诉我某些资源不安全。使用 Chrome 开发者工具,我发现它如下:
The page at https://{mysite}/wp-admin/options-general.php?settings-updated=true displayed insecure content from http://{mysite}/wp-content/plugins/the-events-calendar/resources/events.css?ver=1.6.5.
The page at https://{mysite}/wp-admin/options-general.php?settings-updated=true ran insecure content from http://{mysite}/wp-content/plugins/the-events-calendar/resources/events.js?ver=3.1.1.
看起来“活动日历”插件不太尊重 SSL 设置。
我尝试将管理员中的WordPress address (URL) 和Site address (URL) 配置为https://{mysite},虽然这完全解决了管理员中的问题,但它会在主站点上导致类似的安全内容错误。我并不特别希望主站点通过 SSL 运行,所以我不喜欢这个选项。
该站点安装在 Dreamhost 上,使用他们的“一键安装”系统。它创建的 .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]
</IfModule>
# END WordPress
我觉得正确的修复需要修改 .htaccess,但我有点 犹豫不决,因为我不想破坏 Dreamhost 为 Wordpress 网站提供的自动更新系统。
提前致谢。
编辑:
“WordPress HTTPS”插件似乎解决了我所有的问题。
【问题讨论】: