Added curl, rewrite rules and permissions