如何停止从 http:// 重定向到 https://

asl*_*lum 6 firefox https redirection

我图书馆的 OPAC(在线公共访问目录)网站目前不使用 HTTPS。无论浏览器如何,尝试使用安全连接查看它都会“崩溃”。但是,一旦我不小心尝试通过 HTTPS 访问该站点,现在无论我做什么,它都会自动尝试为我提供安全版本。

我在 Chrome 中遇到了同样的问题有一段时间了,虽然我可以使用这个类似问题中提供的解决方案,它会在我的下一个会话中修复它一段时间,但 HTTP 到 HTTPS 重定向又回到了 Chrome 中。

出于这个原因,我一直在使用 Firefox,直到今天我不小心将网站的 HTTPS 链接粘贴到 Firefox 中,现在 Firefox 也将只提供 HTTPS 版本。

Chl*_*loe 11

退出 Firefox 并编辑文件

/Users/Chloe/AppData/Roaming/Mozilla/Firefox/Profiles/xxxxx.default-999999/SiteSecurityServiceState.txt
Run Code Online (Sandbox Code Playgroud)

删除包含您的域的行。然后重启火狐。这将停止重定向。该文件就像 Chrome 的chrome://net-internals/#hsts.

xxx999将是随机的字母和数字。该路径适用于 Windows。使用Menu > Help > Troubleshooting Information > Profile Folder以找到您的配置文件所在。在Linux中,文件是

/home/<USER>/.mozilla/firefox/profile.default/SiteSecurityServiceState.txt
Run Code Online (Sandbox Code Playgroud)

  • @Coldblackice 我可能知道 Firefox 设置在哪里并使用了`find AppData/Roaming/Mozilla/Firefox/Profiles -type f | CygWin bash shell 中的 xargs grep domain.com`。 (3认同)
  • 哇,很有用。很好奇,你怎么知道这是存储此类的地方? (2认同)