The combination of the baseUrlForSite
and siteForUrl
callbacks configures a site mapping for multi-site support. By configuring a site mapping, you enable Scrivito to differentiate between multiple sites by their individual site IDs and URLs. Scrivito uses this mapping to determine the site the browser is currently displaying, for example. It is also used for cross-site-navigation, i.e., to generate the proper URLs for links on the current site pointing to a page on a different site.