I need help to write function which help me clean out any unusual ( not allow in array list) then redirect to right url
eg my original is /modules.php?aaa=111&bbb=2
the var aaa and bbb is alow using on urls ,
if some one ads other var to url incase you mess up or want to overhead the server they will redirect back to original one.. but cut all invalid param out.
eg: /modules.php?aaa=111¬good=999&bbb=2
will redirect back to
modules.php?aaa=111&bbb=2
the ¬good=999 or any other will be strip out..
$goodvar = array("aaa","bbb");
$requesturi = $_SERVER['REQUEST_URI'];
if /// Need help : if other query not in the list of good var will be clean out of requesturi to build NEWrequesturi
{
header("Location: ".$NEWrequesturi,TRUE,301); exit; die();
}
thanks very much kind regards