change how leading/trailing slashes handled