#6491 Fixes a redirection loop when Nginx is misconfigured and passes an incorrect PATH_INFO