rewrite + controller