Rewrite page on AJAX