Rewrite router