hello i'd like to have simple scirpt that would redirect any visitor is then enter my site like if the url is not xxx.com/?money it redirect to it can't get it worth wtith headerlocation and html java anyone ?
maybe this should work: //Code from http://snipplr.com/view/2734/get-full-url function full_url() { $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $protocol = substr(strtolower($_SERVER["SERVER_PROTOCOL"]), 0, strpos(strtolower($_SERVER["SERVER_PROTOCOL"]), "/")) . $s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI']; } $control = full_url(); $redirect = "http://www.xxx.com/?money"; if ($control != $redirect ) { header("Location: ".$redirect); } elseif ( $control == $redirect ) { echo ""; } Code (markup): just try, cause i didnt try on any page.