Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy, which allows for vanity URLs. Examples:
example.com
-> resolves to home pageexample.com/shop/store
-> Resolves to a Store pageexample-store.com
-> Shows content forexample.com/shop/store
.example-store.com/checkout
-> Shows content forexample.com/shop/store/checkout
silverstripe/framework:3.1.*
Each domain is identified by a key. You must define one domain using the primary
key to mark it as the primary domain.
---
Name: mymultidomain
After: '#multidomain'
---
MultiDomain:
domains:
primary:
hostname: 'example.com'
store:
hostname: 'example-store.com'
resolves_to: 'shop/store'
allow_subdomains
: If true, domain matching is subdomain agnostic, so that anything.example.com still maps to example.com, the primary domain in the above configuration.
Subsites creates a parallel CMS instance for a given domain name. This module allows you to map domains to a specific section of the hierarchy, in the context of all your other pages.
That works to create a vanity URL for one page, but as soon as you go deeper into the hierarchy, you return to the native URL. A more robust solution is required for persisting the vanity URLs.
Further, this module is more extensible, allowing for collaboration with other URL-hungry modules, such as Translatable or Fluent.