A URL request sent by the browser contains three distinct pieces of information: host name, page name and its path, and possible arguments for the target page.
Midgard hooks a filter into Apache that checks every request to determine if it's targeted at a Midgard enabled site. Its translation handler searches for a Midgard Host record that matches the following criteria:
the longest match for the host name or host name and prefix (see Example 3-1).
the host record port is either 0 (any), matches the requested number, or is the default (80).
the host online field is set to "online".
The Host table is shown in Figure 4-2. If no matching host is found, the handler declines to translate the request and standard Apache functionality is resumed.
The path to a page is the location within a Page tree hierarchy, rather than a directory location under Apache's server root. The arguments can be passed in a Midgard specific syntax that mimics traditional file directory syntax. Here is an example:
Functions is the leaf page here, i.e. there is no ffunky page in the page hierarchy. If this targeted Page enables virtual paths, the remaining tokens are stored as arguments in the C-like $argc $argv[] structure : $argc=2 and $argv=["ffunky","fcool"].
This makes Midgard powered web sites crawlable by search engine spiders. The .html extension is here for compatibility and is stripped during URL translation. Any other extension remains unchanged. You may use the usual syntax for arguments as well.