Fix rewrite rules.