繁体   English   中英

.htaccess:非www到www(带https)在Firefox中显示ssl_error_bad_cert_domain

[英].htaccess: non www to www (with https) shows ssl_error_bad_cert_domain in Firefox

我有重定向的问题,并没有在整个网络上找到解决方案......

The right domain is: https://www.fit-for-easa.com

The following redirections DO work:
http://fit-for-easa.com to https://www.fit-for-easa.com
http://www.fit-for-easa.com to https://www.fit-for-easa.com

But the problem is with:
https://fit-for-easa.com

In Chrome it is forwarded correctly to https://www.fit-for-easa.com - 
but not in Firefox what seems very strange to me. 
Firefox shows ssl_error_bad_cert_domain.

这是我的.htaccess文件:

AddType image/svg+xml svg svgz
AddEncoding gzip svgz

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://www.fit-for-easa.com%{REQUEST_URI} [L,R=301]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

可能是问题是证书只适用于www版本而不适用于非www版本吗? Firefox认为这一点至关重要,而Chrome忽略了它吗?

谢谢您的帮助!

(很抱歉,我将文本标记为代码,但我没有足够的声誉来发布两个以上的链接 - 我正在努力!)

在Chrome中,它会正确转发到https://www.fit-for-easa.com - 但在Firefox中并不是我觉得很奇怪。 Firefox显示ssl_error_bad_cert_domain。

它对我来说在Chrome中不起作用。 也许它适合你,因为你之前添加了一个例外。 原因很简单:名称fit-for-easa.com不包含在证书中,只包含带有www前缀的名称。 从证书:

 Subject: OU=Domain Control Validated, OU=PositiveSSL Multi-Domain, CN=3wertig.com
 ...
 X509v3 Subject Alternative Name: 
 DNS:3wertig.com, DNS:www.fit-for-easa.com, DNS:www.steuerberatung-zodel.de

要从https://fit-for-easa.com重定向到任何其他网站,您的证书必须包含URL中显示的名称,即fit-for-easa.com而不是www.fit-for-easa.com 没有htaccess设置或DNS设置可以解决此问题,但必须修复证书。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM