.netepiserver

EPiServer alternative path for site or re-routing


Technology: We are using Dotnet Framework 4.7.2., EPiServer CMS 11

Issue:

We have different pages that are loaded with the following url structure: homepage/clients/specific-client

The /specific-client is defined in CMS, as this represent the CMSable page that is created and published.

However, these clients are mapped on our database to specific client ids.

We want to be able to define something to the tune of this idea: In the url, that a specific client site will load with the corresponding client id, and then the url will be:

homepage/clients/{client-id}

With the caveat, both urls should still work and serve the same site for a given client, so:

If a client "andrews-biz" has the clientId 0123, then both

Should redirect to the same specific site.

Is there a native way to do something like this on EPiServer? Defining an alternative path to a specific site, for example? Copying all these client sites with a job, and manually re-routing them in a controller?

Thanks in advance


Solution

  • This sounds like a perfect fit partial routing, see https://docs.developers.optimizely.com/content-management-system/v11.0.0-cms/docs/partial-routing