Fix rewrite rule issue