点击时隐藏推荐人 [英] Hide Referrer on click
问题描述
当我点击我网站上的链接时,我想隐藏引荐网址。要更好地理解我想要做什么:当有人点击我网站上的链接时,我不希望其他网站所有者知道访问者来自哪里。
I want to hide the referrer when I click a link on my website. To understand better what I want to do: When somebody clicks a link on my website, I don't want the other website owner to know where the visitor came from.
我不在乎PHP,HTML或Javascript是否完成。
I don't care if it's done by PHP, HTML or Javascript.
我尝试使用HTML刷新,JavaScript的window.location,JavaScript弹出,PHP标题重定向,但没有奏效。
I tried with HTML refresh, javascript window.location, javascript popup, PHP header redirect, but nothing worked.
推荐答案
我们使用内部开发的一个简单脚本来完成内部任务系统。我们不希望引荐者信息通过!当我看到我们管理的其他网站时,在使用该脚本时,我没有看到任何引用信息与请求一起传递,但是没有我的脚本。
We use a simple script we developed in-house for an internal task system. We don't want referrer information passed either! When I watch other websites we manage, I do not see any referrer information passed with the request when using the script, but without the script I do.
<?php
// anonym.to.php
// Redirect URLs so the referrer information is dropped. Ideally, this script would be
// invoked by prefixing all external links like this: "/anonym.to.php?URL"
// If a query string is given, then assume it is a website
// and anonymously redirect to it.
if ($_SERVER['QUERY_STRING'])
{
header('Location: '.$_SERVER['QUERY_STRING']);
exit(0);
}
?>
这篇关于点击时隐藏推荐人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!