Mercurial > hg > nginx-site
changeset 711:1f383a8bccdb
Minor improvements over the recent additions to the "error_page" directive.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 08 Oct 2012 09:25:58 +0000 |
parents | 5da520cae945 |
children | 2c9e8facc761 |
files | xml/en/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_core_module.xml |
diffstat | 2 files changed, 18 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml Fri Oct 05 04:37:53 2012 +0000 +++ b/xml/en/docs/http/ngx_http_core_module.xml Mon Oct 08 09:25:58 2012 +0000 @@ -10,7 +10,7 @@ <module name="Module ngx_http_core_module" link="/en/docs/http/ngx_http_core_module.html" lang="en" - rev="6"> + rev="7"> <section id="directives" name="Directives"> @@ -586,14 +586,14 @@ <para> Example: <example> -error_page 404 /404.html; -error_page 500 502 503 504 /50x.html; +error_page 404 /404.html; +error_page 500 502 503 504 /50x.html; </example> </para> <para> Furthermore, it is possible to change the response code to another -using the “<literal>=code</literal>” syntax, for example: +using the “<literal>=</literal><value>response</value>” syntax, for example: <example> error_page 404 =200 /empty.gif; </example> @@ -611,12 +611,12 @@ <para> It is also possible to use redirects for error processing: <example> -error_page 403 http://example.com/forbidden.html; -error_page 404 =301 http://example.com/notfound.html; +error_page 403 http://example.com/forbidden.html; +error_page 404 =301 http://example.com/notfound.html; </example> In this case, the response code 302 is returned to the client. It can only be changed to one of the redirect status -codes (301, 302, 303 and 307). +codes (301, 302, 303, and 307). </para> <para> @@ -635,9 +635,8 @@ <para> <note> -If the <literal>uri</literal> processing led to an error, -the HTTP status code indicating last occurred problem -will be returned. +If <literal>uri</literal> processing leads to an error, +the status code of the last occured error is returned to the client. </note> </para>
--- a/xml/ru/docs/http/ngx_http_core_module.xml Fri Oct 05 04:37:53 2012 +0000 +++ b/xml/ru/docs/http/ngx_http_core_module.xml Mon Oct 08 09:25:58 2012 +0000 @@ -10,7 +10,7 @@ <module name="Модуль ngx_http_core_module" link="/ru/docs/http/ngx_http_core_module.html" lang="ru" - rev="6"> + rev="7"> <section id="directives" name="Директивы"> @@ -574,14 +574,14 @@ <para> Пример: <example> -error_page 404 /404.html; -error_page 500 502 503 504 /50x.html; +error_page 404 /404.html; +error_page 500 502 503 504 /50x.html; </example> </para> <para> Кроме того, можно поменять код ответа на другой, -используя синтаксис вида “<literal>=code</literal>”, например: +используя синтаксис вида “<literal>=</literal><value>ответ</value>”, например: <example> error_page 404 =200 /empty.gif; </example> @@ -600,12 +600,12 @@ Также существует возможность использовать перенаправления для обработки ошибок: <example> -error_page 403 http://example.com/forbidden.html; -error_page 404 =301 http://example.com/notfound.html; +error_page 403 http://example.com/forbidden.html; +error_page 404 =301 http://example.com/notfound.html; </example> В этому случае клиенту возвращается код ответа 302. Его можно изменить только на один из кодов статуса, относящихся к -перенаправлениям (301, 302, 303 and 307). +перенаправлениям (301, 302, 303 и 307). </para> <para> @@ -624,9 +624,8 @@ <para> <note> -В случае возникновения ошибки при обработке <literal>uri</literal> -будет возвращен ответ с кодом HTTP статуса, отражающим последнюю -возникшую проблему. +Если при обработке <literal>uri</literal> происходит ошибка, +клиенту возвращается ответ с кодом статуса последней случившейся ошибки. </note> </para>