# HG changeset patch # User Yaroslav Zhuravlev # Date 1616178274 0 # Node ID 5282d6d3d8491ed3699fcd65c01775cc956b044c # Parent 3a5fcc2248b104f54ef0621e5d8fd8dc33a432ff Improved descripion of r.internalRedirect in njs. diff --git a/xml/en/docs/njs/reference.xml b/xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml +++ b/xml/en/docs/njs/reference.xml @@ -9,7 +9,7 @@
+ rev="69">
@@ -163,10 +163,26 @@ HTTP version, read-only r.internalRedirect(uri) -performs an internal redirect to the specified uri. +performs an +internal +redirect +to the specified uri. If the uri starts with the “@” prefix, it is considered a named location. +Redirected requests become internal and can access the +internal +locations. The actual redirect happens after the handler execution is completed. + + +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. + + + r.log(string)