add rewrite and redirect