Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Merge branch 'larsha-patch-1'
Browse files Browse the repository at this point in the history
Manual merge due to blocking pipeline failure. Patch contains documentation updates only.
  • Loading branch information
fridahjelm committed Apr 21, 2021
2 parents 22702c1 + cb4a15b commit 0931d59
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/rules-cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- [2.3. Redirecting](#23-redirecting)
- [2.3.1 Simple redirection](#231-simple-redirection)
- [2.3.2 Redirection with rewriting](#232-redirection-with-rewriting)
- [2.3.3 Redirection with dynamic rewrite](#233-redirection-with-dynamic-rewrite)
- [2.4 Synthetic responses](#24-synthetic-responses)
- [3. Complete examples](#3-complete-examples)
- [3.1 Routing requests to a single backend and rewriting request headers](#31-routing-requests-to-a-single-backend-and-rewriting-request-headers)
Expand Down Expand Up @@ -415,6 +416,20 @@ Temporarily redirect matching requests to a new domain using HTTPS and adjust th
add: /redirected
```

#### 2.3.3 Redirection with dynamic rewrite

Redirection with dynamic rewrite of the path:

```yaml
actions:
redirect:
type: temporary
path:
- replace:
from_regex: /page/(.*).html
to_regsub: /redirectedpage/\1
```

### 2.4 Synthetic responses

Generating a short synthetic response containing a string:
Expand Down

0 comments on commit 0931d59

Please sign in to comment.