[英].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.