mirror of
https://github.com/caddyserver/website.git
synced 2025-04-23 13:36:16 -04:00
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:
parent
23297691f1
commit
f6ac9b025e
9 changed files with 232 additions and 69 deletions
|
@ -17,10 +17,11 @@ redir [<matcher>] <to> [<code>]
|
|||
|
||||
- **<to>** is the target location. Becomes the response's Location header.
|
||||
- **<code>** 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
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue