Route Requests to a Single MRT Environment with Environment Base Paths
Consider environment base paths when planning your storefront project with multiple Managed Runtime (MRT) environments and a single domain. To route requests to the correct MRT environment via eCDN, set up environment base paths for each MRT environment. Also, use an environment base path to host the storefront within a specific subpath of a website.
This example diagram shows that two base paths are set up for the www.example.com domain. Each base path points to a distinct MRT environment.

An organization with a single domain can host multiple storefronts for various uses. One example is offering a storefront for each locale. For example, Northern Trail Outfitters (NTO) has multiple locations and has multiple storefront URLs for each region. www.northerntrailoutfitters.com/us/retail is for the US region and www.northerntrailoutfitters.com/ca/retail is for the Canadian region. Set up two base paths: us and ca. Both URLs use the same domain, www.northerntrailoutfitters.com, but the base paths map them to distinct MRT environments.
If a storefront provides all locales within a single MRT environment, use multisite instead of base paths. See Configure Multisite URLs.
Another example is a website that hosts the storefront only in a subpath. For example, www.example.com is the main site with pages showing content. It contains one storefront that’s available under a specific path: www.example.com/shop. This path corresponds to an environment base path of /shop. The base path points to an MRT environment.
Configure base paths in config.server.ts under runtime.ssrParameters.envBasePath:
For more information about environment base paths and for setting up MRT environment variables, see Base Path in the pwa-kit GitHub repository.