Joomla 没有正确强制 ssl

Joomla does not properly force ssl

现状

https://domain.nl 正常工作

预期行为:始终强制使用 https

实际行为 在新浏览器中,似乎也可以仅使用 http:// 打开站点,而不管是否设置了强制 ssl。

问题 我希望始终强制使用 https,但无法弄清楚为什么没有遵循预期的行为。

这适用于 Joomla 2.5 和 3.x 网站:

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

我一般不使用 Joomla 设置,只使用 .htaccess 规则。如果您在 Joomla 中关闭强制 SSL,您可以使用以下命令强制 https 和 www:

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.blauwelint.\nl$ [NC]
RewriteRule ^(.*)$ https://www.blauwelint.nl/ [L,R=301]

编辑:另外,分享您的 Joomla 版本和域名时要小心。对 2.5.x 的支持已结束。