php - How to redirect if not from $_SERVER['HTTP_REFERER']? -
<?php if (ereg("www\.test", $_server['http_referer']) != true) { header("location http://www.example.com"); end; } echo "111"; //dosomting? ?>
it still not working
try this:
<?php if (!preg_match("www\.test", $_server['http_referer'])) { header("location: http://www.example.com"); exit(); } //do stuff... ?>
Comments
Post a Comment