Description
指定此context在文件系统中的对应位置。
Default value: $DOC_ROOT + URI
Syntax
It can be an absolute path or path relative to $SERVER_ROOT, $VH_ROOT, or $DOC_ROOT. $DOC_ROOT is the default relative path, and can be omitted.
If the URI is a regular expression, then the matched sub-string can be used to form the "Root" string. The matched sub-string can be referenced with the values "$1" - "$9". "$0" and "&" can be used to reference the whole matched string. Additionally, a query string can be set by appending a "?" followed by the query string. Be careful. "&" should be escaped as "\&" in the query string.
例子
A plain URI like
/examples/ with
位置 set to
/home/john/web_examples will map the request "/examples/foo/bar.html" to file "/home/john/web_examples/foo/bar.html".
To simulate Apache's mod_userdir, set URI to
exp: ^/~([A-Za-z0-9]+)(.*), set
位置 to
/home/$1/public_html$2. With these settings, a request of URI /~john/foo/bar.html will map to file /home/john/public_html/foo/bar.html.
See Also
URI