function forward($url){ header("HTTP/1.0 301"); header('Cache-Control: no-cache, no-cache, must-revalidate'); //HTTP/1.1 header('Pragma: no-cache'); //HTTP/1.0 header('Expires: Sun, 01 Jul 2005 00:00:00 GMT'); $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); if (substr($url,0,1)=='/'){ header("Location: http://$host$url"); }else{ header("Location: http://$host$uri/$url"); } exit(); }