updated rewrite rules