diff --git a/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/XmlSiteMapResult.cs b/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/XmlSiteMapResult.cs index e8b1d299..579790aa 100644 --- a/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/XmlSiteMapResult.cs +++ b/src/MvcSiteMapProvider/MvcSiteMapProvider/Web/Mvc/XmlSiteMapResult.cs @@ -228,7 +228,7 @@ protected virtual IEnumerable GenerateSiteMapIndexElements(int numPage // Generate elements for (int i = 1; i <= numPages; i++) { - var combinedPath = urlPath.Combine(urlPath.AppDomainAppVirtualPath, siteMapUrlTemplate.Replace("{page}", i.ToString())); + var combinedPath = urlPath.Combine(urlPath.AppDomainAppVirtualPath, "~/" + siteMapUrlTemplate.Replace("{page}", i.ToString())); var pageUrl = baseUrl + urlPath.MakeVirtualPathAppAbsolute(combinedPath); yield return new XElement(Ns + "sitemap", new XElement(Ns + "loc", pageUrl)); }