fixing rewrite rule parsing