# HG changeset patch # User Ruslan Ermilov # Date 1349688358 0 # Node ID 1f383a8bccdb7640339999b773a56c4dda4730d1 # Parent 5da520cae9450f33c444cd71bcc1b9a4d38b8529 Minor improvements over the recent additions to the "error_page" directive. diff -r 5da520cae945 -r 1f383a8bccdb xml/en/docs/http/ngx_http_core_module.xml --- 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 @@ + rev="7">
@@ -586,14 +586,14 @@ 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; Furthermore, it is possible to change the response code to another -using the “=code” syntax, for example: +using the “=response” syntax, for example: error_page 404 =200 /empty.gif; @@ -611,12 +611,12 @@ It is also possible to use redirects for error processing: -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; 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). @@ -635,9 +635,8 @@ -If the uri processing led to an error, -the HTTP status code indicating last occurred problem -will be returned. +If uri processing leads to an error, +the status code of the last occured error is returned to the client. diff -r 5da520cae945 -r 1f383a8bccdb xml/ru/docs/http/ngx_http_core_module.xml --- 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 @@ + rev="7">
@@ -574,14 +574,14 @@ Пример: -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; Кроме того, можно поменять код ответа на другой, -используя синтаксис вида “=code”, например: +используя синтаксис вида “=ответ”, например: error_page 404 =200 /empty.gif; @@ -600,12 +600,12 @@ Также существует возможность использовать перенаправления для обработки ошибок: -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; В этому случае клиенту возвращается код ответа 302. Его можно изменить только на один из кодов статуса, относящихся к -перенаправлениям (301, 302, 303 and 307). +перенаправлениям (301, 302, 303 и 307). @@ -624,9 +624,8 @@ -В случае возникновения ошибки при обработке uri -будет возвращен ответ с кодом HTTP статуса, отражающим последнюю -возникшую проблему. +Если при обработке uri происходит ошибка, +клиенту возвращается ответ с кодом статуса последней случившейся ошибки.