added if rewrite rule