Mercurial > hg > nginx-site
changeset 2685:5282d6d3d849
Improved descripion of r.internalRedirect in njs.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Fri, 19 Mar 2021 18:24:34 +0000 |
parents | 3a5fcc2248b1 |
children | 45214e5316cd |
files | xml/en/docs/njs/reference.xml |
diffstat | 1 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/njs/reference.xml Tue Mar 16 19:09:13 2021 +0300 +++ b/xml/en/docs/njs/reference.xml Fri Mar 19 18:24:34 2021 +0000 @@ -9,7 +9,7 @@ <article name="Reference" link="/en/docs/njs/reference.html" lang="en" - rev="68"> + rev="69"> <section id="summary"> @@ -163,10 +163,26 @@ <tag-name id="r_internal_redirect"><literal>r.internalRedirect(<value>uri</value>)</literal></tag-name> <tag-desc> -performs an internal redirect to the specified <literal>uri</literal>. +performs an +<link doc="../dev/development_guide.xml" id="http_request_redirection">internal +redirect</link> +to the specified <literal>uri</literal>. If the uri starts with the “<literal>@</literal>” prefix, it is considered a named location. +Redirected requests become internal and can access the +<link doc="../http/ngx_http_core_module.xml" id="internal">internal</link> +locations. The actual redirect happens after the handler execution is completed. +<para> +<note> +After redirect, +a new njs VM is started in the target location, +the VM in the original location is stopped. +Values of nginx variables are kept +and can be used to pass information to the target location. +</note> +</para> + </tag-desc> <tag-name id="r_log"><literal>r.log(<value>string</value>)</literal></tag-name>