Rewrite each path