【发布时间】:2023-03-27 12:15:02
【问题描述】:
我正在尝试重定向许多请求:
http://www.site.example -> https://site.example
http://site.example -> https://site.example
https://www.site.example -> https://site.example
只有最后一个,不行,返回SSL_ERROR_NO_CYPHER_OVERLAP
我测试了很多条件和规则,这是主要的:
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
附加:
在新的 Google Search Console 中仍然需要添加所有版本(http、https、www、非 www)并选择首选?
【问题讨论】: