HTTP map directives
HTTP map directive
Defines a derived variable evaluated when used. Context: http. No default mapping block. Module availability depends on build. Partial HTTP configuration.
Formal Syntax & Structure
nginx syntaxnginx
map string $variable { ... }Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| string | string | Source expression |
| $variable | variable | Name of result variable |
Working Example
Example Snippetnginx
map $uri $page_kind { default other; /hello.txt greeting;}