mirror of
https://github.com/caddyserver/website.git
synced 2025-04-20 04:15:04 -04:00
add matcher example with capture groups
This commit is contained in:
parent
f74f5ade03
commit
67ceb0bdc6
1 changed files with 10 additions and 1 deletions
|
@ -273,6 +273,15 @@ To match on anything other than a path, define a **named matcher** and refer to
|
|||
reverse_proxy @post localhost:9000
|
||||
```
|
||||
|
||||
To match using capture groups use a named matcher:
|
||||
|
||||
```
|
||||
@ows {
|
||||
path_regexp map_file ^/ows/(.*)
|
||||
}
|
||||
|
||||
redir @ows /index.html?{query}&map=/io/data/{http.regexp.map_file.1}.qgs
|
||||
```
|
||||
|
||||
|
||||
## Placeholders
|
||||
|
@ -356,4 +365,4 @@ If present, it must be the very first block in the config.
|
|||
|
||||
It is used to set options that apply globally, or not to any one site in particular. Inside, only global options can be set; you cannot use regular site directives in them.
|
||||
|
||||
[Learn more](/docs/caddyfile/options) about the global options block.
|
||||
[Learn more](/docs/caddyfile/options) about the global options block.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue