Updated rewrite rules to fix some weirdness when there was no slash at the end of an URL.