Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_core_module.xml @ 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 | a4648185190a |
children | 0914bbb59fd2 |
comparison
equal
deleted
inserted
replaced
710:5da520cae945 | 711:1f383a8bccdb |
---|---|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
9 | 9 |
10 <module name="Module ngx_http_core_module" | 10 <module name="Module ngx_http_core_module" |
11 link="/en/docs/http/ngx_http_core_module.html" | 11 link="/en/docs/http/ngx_http_core_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="6"> | 13 rev="7"> |
14 | 14 |
15 <section id="directives" name="Directives"> | 15 <section id="directives" name="Directives"> |
16 | 16 |
17 <directive name="aio"> | 17 <directive name="aio"> |
18 <syntax> | 18 <syntax> |
584 </para> | 584 </para> |
585 | 585 |
586 <para> | 586 <para> |
587 Example: | 587 Example: |
588 <example> | 588 <example> |
589 error_page 404 /404.html; | 589 error_page 404 /404.html; |
590 error_page 500 502 503 504 /50x.html; | 590 error_page 500 502 503 504 /50x.html; |
591 </example> | 591 </example> |
592 </para> | 592 </para> |
593 | 593 |
594 <para> | 594 <para> |
595 Furthermore, it is possible to change the response code to another | 595 Furthermore, it is possible to change the response code to another |
596 using the “<literal>=code</literal>” syntax, for example: | 596 using the “<literal>=</literal><value>response</value>” syntax, for example: |
597 <example> | 597 <example> |
598 error_page 404 =200 /empty.gif; | 598 error_page 404 =200 /empty.gif; |
599 </example> | 599 </example> |
600 </para> | 600 </para> |
601 | 601 |
609 </para> | 609 </para> |
610 | 610 |
611 <para> | 611 <para> |
612 It is also possible to use redirects for error processing: | 612 It is also possible to use redirects for error processing: |
613 <example> | 613 <example> |
614 error_page 403 http://example.com/forbidden.html; | 614 error_page 403 http://example.com/forbidden.html; |
615 error_page 404 =301 http://example.com/notfound.html; | 615 error_page 404 =301 http://example.com/notfound.html; |
616 </example> | 616 </example> |
617 In this case, the response code 302 is returned to the client. | 617 In this case, the response code 302 is returned to the client. |
618 It can only be changed to one of the redirect status | 618 It can only be changed to one of the redirect status |
619 codes (301, 302, 303 and 307). | 619 codes (301, 302, 303, and 307). |
620 </para> | 620 </para> |
621 | 621 |
622 <para> | 622 <para> |
623 If there is no need to change URI during internal redirection it is | 623 If there is no need to change URI during internal redirection it is |
624 possible to pass error processing into a named location: | 624 possible to pass error processing into a named location: |
633 </example> | 633 </example> |
634 </para> | 634 </para> |
635 | 635 |
636 <para> | 636 <para> |
637 <note> | 637 <note> |
638 If the <literal>uri</literal> processing led to an error, | 638 If <literal>uri</literal> processing leads to an error, |
639 the HTTP status code indicating last occurred problem | 639 the status code of the last occured error is returned to the client. |
640 will be returned. | |
641 </note> | 640 </note> |
642 </para> | 641 </para> |
643 | 642 |
644 </directive> | 643 </directive> |
645 | 644 |