力的https://www.domain到https://域名 [英] Force https://www.domain to https://domain

查看:330
本文介绍了力的https://www.domain到https://域名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚换了从 http://www.domain.com 的Magento网站的 https://www.domain.com 在exitement比现在一切都会好的......

I just switched our Magento website from http://www.domain.com to https://www.domain.com in the exitement than now everything would be fine...

但现在所有的旧 http://www.domain.com -url's现在显示:NET :: ERR_CERT_COMMON_NAME_INVALID,不安全的域...

But now all old http://www.domain.com -url´s is now showing: NET::ERR_CERT_COMMON_NAME_INVALID, insecure domain...

https://domain.com 和的 https://domain.com/etc/etc 正常工作......

https://domain.com and https://domain.com/etc/etc works fine...

我想我必须强制所有流量莫名其妙......

I guess I have to force all traffic somehow...

怎么会呢?

推荐答案

证书被解读为SSL握手的一部分,这种情况发生的请求之前甚至发送到服务器。在此握手,你的浏览器中看到你所要求的www.something和证书说,它只是为东西(不带WWW),因此浏览器停止在那里,给你的错误。有什么您可以通过htaccess的做prevent的错误。你需要购买一个新的证书或更改所有的链接只能指向非www的主机名(但这并不prevent人得到的错误,当你去到www主机名)。

The certificate is read as part of the SSL handshake, and this happens before the request is even sent to the server. During this handshake, your browser sees that you've requested "www.something" and the cert says it's only for "something" (without the www.), and so the browser STOPs right there and gives you that error. There is nothing you can do through htaccess to prevent that error. You need to buy a new cert or change all your links to only point to the non-www hostname (but this won't prevent people getting the error when you go to the www hostname).

这篇关于力的https://www.domain到https://域名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆