adds rewrite base