Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个重定向到外部 https 页面的 php 脚本,但不幸的是,firefox(可能还有其他浏览器尚未尝试)阻止 https 重定向,并为最缺乏经验的用户提供一个非常“可怕”的消息。
有没有办法绕过这个问题而不要求用户处理他们的浏览器偏好?
对于重定向,我使用了一个简单的header ("Location: $url");
header ("Location: $url");
谢谢
简而言之,没有。
如果用户将他们的 Firefox 首选项设置为在重定向发生时显示警告,那么您将无法绕过它。
您可以通过显示一个用户可以手动单击链接的插页式页面来避免这种情况。
RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]