Added basic rewrite rules. To be cleaned up.