HTTP directives
proxy_redirect directive (HTTP)
Contexts: http, server, location. Default: default. Rewrites matching Location and Refresh response values; default is unavailable with variable-based proxy_pass.
Formal Syntax & Structure
nginx syntaxnginx
proxy_redirect default | off | redirect replacement;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| redirect | default | off | string or expression | regex | Select automatic rewriting, cancel inherited rules, or match the original redirect. |
| replacement | string or expression | Required for explicit matching form; may use regex captures. |
Working Example
Example Snippetnginx
proxy_redirect http://catalog.test/ http://edge.test:18160/shop/;