Adding rewrite rules support