Regex Rewrite
Summary
If Regex Rewrite is set, the URL path will be rewritten according to the pattern and substitution, similar to prefix_rewrite
.
How to configure
- Core
- Enterprise
- Kubernetes
YAML/JSON setting | Type | Usage |
---|---|---|
regex_rewrite_pattern | string | optional |
regex_rewrite_substitution | string | optional |
Set Regex Rewrite pattern and substitution in the Console:
Kubernetes does not support Regex Rewrite
Examples
regex_rewrite_pattern: '^/service/([^/]+)(/.*)$'
regex_rewrite_substitution: "\\2/instance/\\1"