Skip to content

Instantly share code, notes, and snippets.


Created May 20, 2015
What would you like to do?
Hide referrers with Keitaro TDS. Just place file hide_referrer.php with code below to application/redirects/
* @redirectName HIDE REFERER
* @redirectWeight 100
class hide_referrer_redirect extends AbstractRedirect2
public function go(Stream $stream, Visitor $visitor)
$this->setContent($this->_gethideRedirect($stream, $visitor));
private function _gethideRedirect(Stream $stream, Visitor $visitor)
$code = '<script>
function go() {
window.frames[0].document.body.innerHTML = \'<form target="_parent" method="post" action="' . $stream->getUrlWithParams($visitor) . '"></form>\';
<iframe onload="window.setTimeout(\'go()\', 99)" src="about:blank" style="visibility:hidden"></iframe>';
return $code ;
public function goDebug(Stream $stream, Visitor $visitor)
return "Redirecting to: " . $stream->getUrlWithParams($visitor);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment