From 81a9b3c54d7b1285097b8d15873eee4d54a2ce5b Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Mon, 31 Aug 2020 15:56:44 -0400 Subject: [PATCH] docs: Mention the file matcher placeholders in the caddyfile docs (#81) --- src/docs/markdown/caddyfile/matchers.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/docs/markdown/caddyfile/matchers.md b/src/docs/markdown/caddyfile/matchers.md index 0ade1b2..a7fdcf1 100644 --- a/src/docs/markdown/caddyfile/matchers.md +++ b/src/docs/markdown/caddyfile/matchers.md @@ -211,6 +211,11 @@ An empty `file` matcher (one with no files listed after it) will see if the requ Since rewriting based on the existence of a file on disk is so common, there is also a [`try_files` directive](/docs/caddyfile/directives/try_files) which is a shortcut of the `file` matcher and a [`rewrite` handler](/docs/caddyfile/directives/rewrite). +Upon matching, two new placeholders will be made available: + +- `{http.matchers.file.relative}` The root-relative path of the file. This is often useful when rewriting requests. +- `{http.matchers.file.absolute}` The absolute path of the matched file. + #### Examples: Match requests where the path is a file that exists.