Update rewrite.class.php