Updated rewrite conditions and rule.