Mercurial > hg > nginx-site
comparison xml/en/docs/njs/reference.xml @ 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 | 8f3e9ff2785f |
children | 7ff9d8bda757 |
comparison
equal
deleted
inserted
replaced
2684:3a5fcc2248b1 | 2685:5282d6d3d849 |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="Reference" | 9 <article name="Reference" |
10 link="/en/docs/njs/reference.html" | 10 link="/en/docs/njs/reference.html" |
11 lang="en" | 11 lang="en" |
12 rev="68"> | 12 rev="69"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <link doc="index.xml">njs</link> provides objects, methods and properties | 17 <link doc="index.xml">njs</link> provides objects, methods and properties |
161 HTTP version, read-only | 161 HTTP version, read-only |
162 </tag-desc> | 162 </tag-desc> |
163 | 163 |
164 <tag-name id="r_internal_redirect"><literal>r.internalRedirect(<value>uri</value>)</literal></tag-name> | 164 <tag-name id="r_internal_redirect"><literal>r.internalRedirect(<value>uri</value>)</literal></tag-name> |
165 <tag-desc> | 165 <tag-desc> |
166 performs an internal redirect to the specified <literal>uri</literal>. | 166 performs an |
167 <link doc="../dev/development_guide.xml" id="http_request_redirection">internal | |
168 redirect</link> | |
169 to the specified <literal>uri</literal>. | |
167 If the uri starts with the “<literal>@</literal>” prefix, | 170 If the uri starts with the “<literal>@</literal>” prefix, |
168 it is considered a named location. | 171 it is considered a named location. |
172 Redirected requests become internal and can access the | |
173 <link doc="../http/ngx_http_core_module.xml" id="internal">internal</link> | |
174 locations. | |
169 The actual redirect happens after the handler execution is completed. | 175 The actual redirect happens after the handler execution is completed. |
176 <para> | |
177 <note> | |
178 After redirect, | |
179 a new njs VM is started in the target location, | |
180 the VM in the original location is stopped. | |
181 Values of nginx variables are kept | |
182 and can be used to pass information to the target location. | |
183 </note> | |
184 </para> | |
185 | |
170 </tag-desc> | 186 </tag-desc> |
171 | 187 |
172 <tag-name id="r_log"><literal>r.log(<value>string</value>)</literal></tag-name> | 188 <tag-name id="r_log"><literal>r.log(<value>string</value>)</literal></tag-name> |
173 <tag-desc> | 189 <tag-desc> |
174 writes a <literal>string</literal> to the error log | 190 writes a <literal>string</literal> to the error log |