Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,090 of 9,090 pages
About the help in other languages
All help pages

Module 2: Matching requests to siteaccesses

The second module of Multisite and site packages. Learners match requests to siteaccesses by URL path, host name, host and path together and port, and send visitors of the bare address to their language. 3 hours 45…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/trainers/multisite-and-packages/module-02-matching-requests/README.md

On this page

Module 2: Matching requests to siteaccesses

A siteaccess is only useful when requests reach it. This module teaches every way the kernel matches a request to a siteaccess, from the first part of the path to host names, host and path together, ports, and finally the redirect that sends visitors of example.com/ to their language. All exercises use curl with a Host header, so no DNS entries are needed.

At a glance

CourseMultisite and site packages
Duration3 hours 45 minutes (with two 10-minute breaks)
Lessons4
LevelIntermediate to advanced

Lessons

LessonDurationWhat learners do
Lesson 2.1: Matching by URL path50 minutesPredict which siteaccess answers an address; set PathPrefix
Lesson 2.2: Matching by host name55 minutesMap a host to site_b, test with curl, use HostMatchMethod=start
Lesson 2.3: Host and path together, and matching by port50 minutesMap host and path with HostUriMatchMapItems[], see why order matters, print the port defaults
Lesson 2.4: The redirect to the visitor's language50 minutesSet up DefaultHostUriMatchMapItems[] and read the 302 and its cache headers

Preparing this module

  • Every learner has finished module 1: the siteaccesses site_b and site_b_ger answer at /site_b and /site_b_ger.
  • curl is installed where learners work (their computer or the lab server), and they know their lab's address.
  • The exercises change MatchOrder and the host maps in the global override. That is fine with one installation per learner; on a shared training server, do lessons 2.2 to 2.4 as a demonstration on the projector instead.
  • Note the commands that undo each lesson (exp:ini rem, exp:ini set ... MatchOrder uri), in case a learner wants a clean state, or reset the lab as in Lesson 2.6 of Train the trainer.
  • If labs run on Exponential Velocity, show once that every settings change needs php bin/php/console exp:velocity restart.

Timing plan

PartMinutes
Lesson 2.150
Lesson 2.255
Break10
Lesson 2.350
Break10
Lesson 2.450
Total225

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x