Fix to run in MySQL strict mode and add IIS support for rewrite rules