2015-12-11 40 views
5

我有一個問題,重定向並沒有發現整個網絡上的解決方案...的.htaccess:非WWW到www(以https)顯示ssl_error_bad_cert_domain在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會忽略它?

謝謝你的幫助!

(對不起,我標誌着文字代碼,但我沒有足夠的信譽來發布兩個以上的鏈路 - !我的工作就可以了)

回答

3

在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重定向到任何其他網站您的證書必須包括如圖所示的網址,即fit-for-easa.com而不是www.fit-for-easa.com名稱。沒有htaccess設置或DNS設置可以解決此問題,但證書必須修復。

+0

非常感謝您的明確和有益的答案!我會更新證書。 – user3009320

相關問題