query("SELECT * FROM categories WHERE idCategory = '" . $_GET['idCategory']. "'"); if ($q->next()){ header( "HTTP/1.1 301 Moved Permanently" ); header("Location:http://www.zetalab.it/categoria-prodotto/categoria-".wp_pl_str($q->get("categoryDesc"))); die(); exit(); //echo//die($q->get("categoryDesc")); //header("Access-Control-Allow-Origin: *"); //readfile(/*header("Location:*/"http://www.zetalab.it/categoria-prodotto/categoria-".wp_pl_str($q->get("categoryDesc"))); } else { die("not found"); } ?>