【发布时间】:2021-01-22 14:13:52
【问题描述】:
我在我的 LAMP SSL 证书上安装了 Let´s encrypt。我想通过 HTTPS 重定向我的所有域。 现在它的工作,但不完全。
http://domain.name 重定向到 https://domain.name(证书有效)
http://www.domain.name 不重定向到 https://,而是直接重定向到 https://www.domain.name(证书有效)
这是我的 .htaccess 文件
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
【问题讨论】: