Vue Storefront is now Alokai! Learn More
Overview

Sub-path Routing Overview

Sub-path routing allows you to serve different integration configurations from the same Alokai deployment using URL paths. This approach enables content and configuration variations within a single brand without requiring separate domain deployments.

How It Works

Sub-path routing uses the Config Switcher extension to dynamically select integration configurations based on URL paths:

  • /en/electronics - Electronics configuration with specific catalog, CMS space, or API settings
  • /en/apparel - Apparel configuration with different products, content, and styling

All served from a single Storefront deployment.

Key Concepts

Config Switcher Integration: Your middleware dynamically switches between different integration configurations (commerce, CMS, search, etc.) based on the x-alokai-middleware-config-id header sent by your storefront.

Single Deployment: Unlike domain-based approaches, sub-path routing uses one deployment that conditionally serves different configurations in runtime.

Unified Experience: Users maintain sessions, cart state, and can navigate seamlessly between different sections without domain changes.

Next Steps