Rewrite index