Extensionless Urls
After migrating from 3.7 to 4.2, we've noticed that the pages that were migrated still have the .aspx extension and any new pages are extensionless. Is there a way to change the pages that were migrated from the 3.7 site to be extensionless as well?
thanks,
Hi Dewayne,
We have prepared a sample code for you, which should convert the page URLs to extensionless urls:
var fluent = App.WorkWith().Pages();
var mypage = fluent.LocatedIn(Telerik.Sitefinity.Fluent.Pages.PageLocation.Frontend)
.Where(p => p.Page != null && p.Extension == ".aspx")
.ForEach(p=>
p.Extension = "";
)
.SaveChanges();