Extensionless Urls

Posted by Community Admin on 05-Aug-2018 21:51

Extensionless Urls

All Replies

Posted by Community Admin on 14-Nov-2011 00:00

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,

Posted by Community Admin on 15-Nov-2011 00:00

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

This thread is closed