enable rewrite