RouteOptions configures default rules for URLs generated by ASP.NET Core routing. It can force lowercase paths, preserve or lowercase query strings, and append trailing slashes. Route matching remains case-insensitive, but generated links use one consistent format. section 6.4.3
Configure consistent generated URLs
Register RouteOptions with builder.Services.Configure<RouteOptions>(), then set LowercaseUrls and AppendTrailingSlash to true while leaving LowercaseQueryStrings false. Named endpoints such as healthcheck and product then receive these defaults when LinkGenerator.GetPathByName generates links. section 6.4.3
Use LinkOptions when one generated URL must differ from the application defaults. Its values override RouteOptions, which is useful when a legacy route requires different casing or slash behavior. section 6.5
