Add rewrite configuration and schema definition