Better handling of trailing slash configuration