comparison xml/en/docs/http/ngx_http_core_module.xml @ 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 5cd4964fbc5f
comparison
equal deleted inserted replaced
1826:da6a3e401b26 1827:64e2b8c5200d
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="62"> 13 rev="63">
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>
621 error_page 500 502 503 504 /50x.html; 621 error_page 500 502 503 504 /50x.html;
622 </example> 622 </example>
623 </para> 623 </para>
624 624
625 <para> 625 <para>
626 This causes an internal redirect to the specified <value>uri</value>
627 with the client request method changed to “<literal>GET</literal>”
628 (for all methods other than
629 “<literal>GET</literal>” and “<literal>HEAD</literal>”).
630 </para>
631
632 <para>
626 Furthermore, it is possible to change the response code to another 633 Furthermore, it is possible to change the response code to another
627 using the “<literal>=</literal><value>response</value>” syntax, for example: 634 using the “<literal>=</literal><value>response</value>” syntax, for example:
628 <example> 635 <example>
629 error_page 404 =200 /empty.gif; 636 error_page 404 =200 /empty.gif;
630 </example> 637 </example>
639 error_page 404 = /404.php; 646 error_page 404 = /404.php;
640 </example> 647 </example>
641 </para> 648 </para>
642 649
643 <para> 650 <para>
644 If there is no need to change URI during internal redirection it is 651 If there is no need to change URI and method during internal redirection
645 possible to pass error processing into a named location: 652 it is possible to pass error processing into a named location:
646 <example> 653 <example>
647 location / { 654 location / {
648 error_page 404 = @fallback; 655 error_page 404 = @fallback;
649 } 656 }
650 657