docs: Changes for v2.5.1 release (#228)

* docs: Changes for v2.5.1 release

* Remove path from addresses doc

* Fix www redirect pattern
This commit is contained in:
Francis Lavoie 2022-05-17 14:32:11 -04:00 committed by GitHub
parent 23297691f1
commit f6ac9b025e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 232 additions and 69 deletions

View file

@ -17,10 +17,11 @@ redir [<matcher>] <to> [<code>]
- **&lt;to&gt;** is the target location. Becomes the response's Location header.
- **&lt;code&gt;** is the HTTP status code to use for the redirect. Can be:
- A positive integer in the 3xx range
- A positive integer in the 3xx range, or 401
- `temporary` for a temporary redirect (302; default)
- `permanent` for a permanent redirect (301)
- `html` to use an HTML document to perform the redirect (useful for redirecting browsers but not API clients)
- A placeholder with a status code value
@ -42,4 +43,10 @@ Same, but permanent:
```caddy-d
redir https://example.com{uri} permanent
```
```
Redirect your old `/about-us` page to your new `/about` page:
```caddy-d
redir /about-us /about
```