Mercurial > hg > nginx-site
changeset 1827:64e2b8c5200d
Documented request method change by error_page in /uri redirection.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 24 Oct 2016 11:57:50 +0300 |
parents | da6a3e401b26 |
children | e0b5a74c771f |
files | xml/en/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_core_module.xml |
diffstat | 2 files changed, 20 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml Mon Oct 24 11:57:46 2016 +0300 +++ b/xml/en/docs/http/ngx_http_core_module.xml Mon Oct 24 11:57:50 2016 +0300 @@ -10,7 +10,7 @@ <module name="Module ngx_http_core_module" link="/en/docs/http/ngx_http_core_module.html" lang="en" - rev="62"> + rev="63"> <section id="directives" name="Directives"> @@ -623,6 +623,13 @@ </para> <para> +This causes an internal redirect to the specified <value>uri</value> +with the client request method changed to “<literal>GET</literal>” +(for all methods other than +“<literal>GET</literal>” and “<literal>HEAD</literal>”). +</para> + +<para> Furthermore, it is possible to change the response code to another using the “<literal>=</literal><value>response</value>” syntax, for example: <example> @@ -641,8 +648,8 @@ </para> <para> -If there is no need to change URI during internal redirection it is -possible to pass error processing into a named location: +If there is no need to change URI and method during internal redirection +it is possible to pass error processing into a named location: <example> location / { error_page 404 = @fallback;
--- a/xml/ru/docs/http/ngx_http_core_module.xml Mon Oct 24 11:57:46 2016 +0300 +++ b/xml/ru/docs/http/ngx_http_core_module.xml Mon Oct 24 11:57:50 2016 +0300 @@ -10,7 +10,7 @@ <module name="Модуль ngx_http_core_module" link="/ru/docs/http/ngx_http_core_module.html" lang="ru" - rev="62"> + rev="63"> <section id="directives" name="Директивы"> @@ -620,6 +620,13 @@ </para> <para> +При этом делается внутреннее перенаправление на указанный <value>uri</value>, +а метод запроса клиента меняется на “<literal>GET</literal>” +(для всех методов, отличных от +“<literal>GET</literal>” и “<literal>HEAD</literal>”). +</para> + +<para> Кроме того, можно поменять код ответа на другой, используя синтаксис вида “<literal>=</literal><value>ответ</value>”, например: <example> @@ -637,8 +644,8 @@ </para> <para> -Если при внутреннем перенаправлении не нужно менять URI, то можно передать -обработку ошибки в именованный location: +Если при внутреннем перенаправлении не нужно менять URI и метод, +то можно передать обработку ошибки в именованный location: <example> location / { error_page 404 = @fallback;