More in this section
Forums / Developing with Sitefinity / URL Re-writing

URL Re-writing

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
1 posts, 0 answered
  1. Basheir
    Basheir avatar
    1 posts
    Registered:
    04 Mar 2015
    08 Nov 2015
    Link to this post
    Hi there, 

    We are working on a SF feather project (8.1). We need to achieve the following:

    1- Overwrite the built-in routing in the CMS, so that we can use our own routing. 

    Below is the code that will add our routing, but we are not able to change the routing to be able to change the page name order in the url

    We need to achieve the following url Structure 

    host/{parentContentTitle}/{ChildContentTitle}/pageName 


    Here is our code:

    void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
            {
                if (e.CommandName == "RegisterRoutes")
                {
                    RegisterRoutes(RouteTable.Routes);
                }
            }

    private void RegisterRoutes(RouteCollection routeCollection)
            {
               // routeCollection.IgnoreRoute("{resource}.axd/{*pathInfo}");

                routeCollection.MapRoute(
                    "Page",
                    "{id}/Page",
                    new { controller = "Page", action = "Index", id= UrlParameter.Optional }
                    );
            }

1 posts, 0 answered