Extensionless Urls - Upgrading Sitefinity - Upgrading Sitefinity - Progress Community
 Upgrading Sitefinity

Extensionless Urls

  • 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();


    Greetings,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items