generate.php remove redirect