Rewrite intent handler