Routing sitemap.xml in ASP.NET Core

ASP.NET Core provides the option to set a friendly URL. So instead of just sitemap, it can be set to sitemap.xml.

By using AddPageRoute the route to a page can be configured with a friendly URL.

options.Conventions.AddPageRoute("/Sitemap", "Sitemap.xml");

Comments

Leave a Comment

All fields are required. Your email address will not be published.