Rewrite rule check