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

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

问题描述

几天前,Chrome 开始将我在 Wampserver 中的所有虚拟主机重定向到 https.直到几天前一切正常,然后有一天我登录到我的网站上工作,Chrome 说无法访问该网站,即使我使用了过去总是使用的相同 URL.Wamp 与 Apache 和 MySQL 一样在运行,并且这些服务都没有在错误日志中出现任何错误.

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.

我已经尝试使用 chrome://net-internals/#hsts 删除域(我为我的本地站点使用了一个假的 .dev 扩展名),但这没有做任何事情.我还尝试安装 SSL 以查看 Chrome 是否会将其检测为安全连接......什么都没有.我什至尝试完全重新安装 Wamp(即使 vHost 在其他浏览器中运行良好)并且没有任何改变.

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.

在 Chrome 中唯一有效的是通过 http://localhost/site 访问站点.我所有的 Apache vHost 都会重定向到 HTTPS.我用谷歌搜索又搜索,但找不到任何真正解决问题的方法.

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 强制 .dev 域使用 HTTPS.Internet 工程任务组 RFC2606 指定了应使用哪些顶级域进行本地开发,并且 .dev 不在该列表中.

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 拥有 .dev 顶级域,并通过预加载的 HSTS 自动将所有 .dev 域名重定向到网站的 HTTPs 版本.

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

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

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天全站免登陆