如何阻止Chrome重定向到HTTPS? [英] How to stop Chrome from redirecting to HTTPS?

查看:417
本文介绍了如何阻止Chrome重定向到HTTPS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前,Chrome开始将Wampserver中的所有主机重定向到https。一切都很好,直到几天前,然后有一天我登录到我的网站上工作,Chrome表示该网站无法访问,即使我使用了过去一直使用的相同网址。 Wamp和Apache以及MySQL一样正常运行,而且这些服务在错误日志中都没有任何错误。



我已经尝试删除域名(我使用了伪造域名。 dev扩展为我的本地站点)与 chrome:// net-internals /#hsts 但没有做任何事情。我也尝试安装SSL来查看Chrome是否会将其作为安全连接检测到......没有任何结果。我甚至尝试彻底重新安装Wamp(即使vHosts在其他浏览器中工作正常)并且没有任何更改。



Chrome中唯一有效的功能是通过的http://本地主机/站点。重定向到HTTPS发生在我所有的Apache vHost上。

  • Chrome v63强制.dev域名转换为.dev域名HTTPS。互联网工程任务组 RFC2606 指定了什么顶级域名应该用于本地开发,并且.dev不在该列表中。



    Google拥有.dev顶级域名,并通过预加载的HSTS自动将所有.dev域名重定向到网站的HTTP版本。



    使用.dev作为官方通用顶级域名(gTLD),我们更好地将我们的本地开发后缀从.dev更改为其他内容,即使其他人解决方案(例如带有自签名证书的https)。因此,您应该使用 .test .example .invalid .localhost 作为您的本地开发TLD。

    A few days ago, Chrome started redirecting all of my vHosts in Wampserver to https. Everything was working fine until a couple days ago, then one day I logged on to work on my site and Chrome said that the site couldn't be reached, even though I used the same URL i always did in the past. Wamp is running as well as Apache and MySQL and none of those services have any errors in the error log.

    I have already tried removing the domain(I use a fake .dev extension for my local sites) with chrome://net-internals/#hsts but that didn't do anything. I also tried installing SSL to see if Chrome would detect it as a secure connection... nothing. I even tried reinstalling Wamp completely(even though the vHosts work fine in other browsers) and nothing changed.

    The only thing that works in Chrome is accessing the sites via http://localhost/site. The redirect to HTTPS happens for all of my Apache vHosts. I've googled and googled and can't find anything that actually fixes the problem.

    解决方案

    Chrome v63 forces .dev domains to HTTPS. The Internet Engineering Task Force RFC2606 specified what top level domains should be used for local development, and .dev isn't on that list.

    Google owns the .dev top level domain and automatically redirects all .dev domain names to an HTTPs version of the site via preloaded HSTS.

    With .dev being an official generic top-level domain (gTLD), we're better changing our local development suffix from .dev to something else, even if there are other solutions (e.g. https with self-signed certificates). So you should use .test, .example, .invalid or .localhost as your local development TLDs instead.

    这篇关于如何阻止Chrome重定向到HTTPS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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