Fix code to be able to setup with MySQL strict mode and add support for IIS rewrite rules