xin

if

Conditionally runs rewrite directives.

Syntaxif (condition) { ... }
Contextsserverlocation

Behavior

Conditions include variable truthiness, string comparisons, regular expressions and file tests. Permitted child directives depend on server versus location scope.

Example

if ($request_method = POST) { return 405; }