resourse rewrite