Updated rewrite rules