add rewrite to directory