我有一个来 self 的网络主机的共享 SSL 证书(为了这篇文章)看起来像这样:
https://some-ssl-cert/mysite
转到该链接将转到我的站点,并在 https://
中显示它并带有绿色挂锁。
正常站点是http://
如何将网站的主登录名显示为 https://
?
显然,我无法告诉或将我的用户重定向到 https://some-ssl-cert/mysite
,所以我对如何实现这一点感到非常困惑。
最后,当我需要在不是 https://
的其他页面上发送敏感信息时,我会将该信息简单地发送到 https://some-ssl-cert/我的网站?
因此,例如,如果我需要发出安全的 ajax 请求或其他东西,我会通过 https://some-ssl-cert/mysite
访问 .php 文件吗?
最佳答案
How do I display the main login for the website as https://?
您的网站所用的主机名需要一个 SSL 证书。您还需要您的主机支持它。
Lastly, when I need to send sensitive information on other pages that aren't https:// would I simply send that information to
https://some-ssl-cert/mysite
?
如果您需要发送敏感信息,则需要通过 HTTPS 进行。如果您使用的是纯 HTTP,则需要重定向到 HTTPS 站点。
So for instance, if I needed to make a secure ajax request or something would I access the .php file via
https://some-ssl-cert/mysite
?
整个网页需要通过 HTTPS 提供服务。否则:
- 这将是一个跨域请求,ajax 将失败(CORS/JSONP/等除外)
- 非安全页面可能会受到干扰(例如,添加的 JS 会窃取安全获取的数据)。
关于php - 对使用 SSL 感到困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14234484/