我想破解我的浏览器,以便在我输入 URL 时从一个网站重定向到另一个网站。
例如:
当我在我的 Firefox 地址栏中输入“facebook.com”时,我希望它重定向到“lite.facebook.com”
Firefox 中是否有允许我执行此操作的配置文件?几乎像本地 mod_rewrite?
最佳答案
它看起来像 Greasemonkey plugin for Firefox会让你这样做。
例如,它会让您将页面重定向到等效的安全版本,如下所示:
window.location.href = window.location.href.replace(/^http:/, 'https:');
关于http - 浏览器中的本地 HTTP 重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1440519/