Added api to rewrite rules.