rewrite get and post