private string DefaultMapping(PathString fileSystemPath) { var segments = fileSystemPath.Value.ToLower().Split('/'); var lastSegment = segments[segments.Length - 1]; var extSeparator = lastSegment.LastIndexOf('.'); if (extSeparator > 0) { segments[segments.Length - 1] = lastSegment.Substring(0, extSeparator); fileSystemPath = new PathString(string.Join("/", segments)); } if (RootPath.HasValue) { return(RootPath.Add(fileSystemPath).Value); } return(fileSystemPath.Value); }