throw exception when not using trailing slashes