.htaccess:non-www-to-www(使用https)在Firefox中显示ssl\u错误\u错误\u证书\u域

.htaccess:non-www-to-www(使用https)在Firefox中显示ssl\u错误\u错误\u证书\u域,.htaccess,mod-rewrite,ssl,https,no-www,.htaccess,Mod Rewrite,Ssl,Https,No Www,我有一个重定向问题,并没有找到一个解决方案在整个网络 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

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

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>
AddType image/svg+xml-svg-svgz
加法编码gzip svgz
重新启动发动机
重写cond%{HTTPS}=在…上
重写规则^https://www.fit-for-easa.com%{REQUEST_URI}[L,R=301]
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
问题是否在于该证书仅适用于www版本,而不适用于非www版本?Firefox接受了这一点,而Chrome却忽略了这一点

谢谢你的帮助

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

在Chrome中,它被正确转发到
https://www.fit-for-easa.com
- 但在Firefox中,我并不觉得奇怪。 Firefox显示ssl\u错误\u错误\u证书\u域

对我来说,它在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设置可以解决此问题,但必须修复证书。

非常感谢您给出的清晰而有用的答案!我将更新证书。