function redirection($location, $script = false) { if (!$script) { header("HTTP/1.1 301 Moved Permanently"); header("Location: ".str_replace("&", "&", $location)); exit; } else { echo "\n"; exit; } } if (preg_match("/\/(articles|photogallery|news|contact|login|weblinks)\.php/i", FUSION_REQUEST, $matches)){ redirection(BASEDIR.$matches[1]); }