fixed error in rewrite.php where URL wasn't modified.