@@ -51,10 +51,10 @@ also executed in phase C<rewrite>.
5151After C<rewrite>, it is the C<post-rewrite> phase. Just
5252like C<find-config>, this phase does not allow Nginx modules
5353to register their handlers either, instead it carries out
54- the needed "internal jumps " by Nginx core (if this has been
54+ the needed "internal redirects " by Nginx core (if this has been
5555requested in C<rewrite> phase). We have addressed the "internal
5656jump" concept in L<vartut/(02)>, and demonstrated how to issue
57- the "internal jump " with command L<ngx_echo/echo_exec> or
57+ the "internal redirect " with command L<ngx_echo/echo_exec> or
5858command L<ngx_rewrite/rewrite>. However, let's focus on
5959command L<ngx_rewrite/rewrite> for the moment since command
6060L<ngx_echo/echo_exec> is executed in C<content> phase and
@@ -79,9 +79,9 @@ our example in L<vartut/(02)>:
7979The command L<ngx_rewrite/rewrite> found in directive
8080C<location /foo>, rewrites the URI of current request
8181as C</bar> unconditionally, meanwhile, it issues an
82- "internal jump " and execution continues from C<location /bar>.
82+ "internal redirect " and execution continues from C<location /bar>.
8383What ultimately intrigues us, is the magical bits and pieces
84- of "internal jump " mechanism, "internal jump " effectively
84+ of "internal redirect " mechanism, "internal redirect " effectively
8585rewinds our processing of current request back to the
8686C<find-config> phase, so that the C<location> directives
8787can be matched again to the request URI, which usually
@@ -94,7 +94,7 @@ It might not be obvious, that the actual act of rewinding to
9494C<find-config> does not occur in C<rewrite> phase, instead
9595it occurs in the following C<post-rewrite> phase. Command
9696L<ngx_rewrite/rewrite> in the former example, simply requests
97- Nginx to issue an "internal jump " in its C<post-rewrite>
97+ Nginx to issue an "internal redirect " in its C<post-rewrite>
9898phase. This design is usually questioned by Nginx beginners
9999and they tend to come up with an idea to execute the "internal
100100jump" directly by command L<ngx_rewrite/rewrite>. The answer
@@ -121,8 +121,8 @@ the very beginning. Such as:
121121The request URI has been rewritten twice in C<location /foo>
122122directive: firstly it becomes C</bar>, secondly it becomes
123123C</baz>. As the net effect of both L<ngx_rewrite/rewrite>
124- statements, "internal jump " occurs only once in C<post-rewrite>
125- phase. If it would have executed the "internal jump " at
124+ statements, "internal redirect " occurs only once in C<post-rewrite>
125+ phase. If it would have executed the "internal redirect " at
126126the first URI rewrite, the second would have no chance to be
127127executed since processing would have left current C<location>
128128directive. To prove this we send a request to C</foo>:
@@ -147,7 +147,7 @@ jump" occurs only once.
147147
148148Quite obviously, if command C<ngx_rewrite/rewrite> is used
149149to rewrite the request URI in C<server> directive, there won't
150- be any "internal jumps ", this is because the URI rewrite
150+ be any "internal redirects ", this is because the URI rewrite
151151is happening in C<server-rewrite> phase, which gets executed
152152earlier than C<find-config> phase that matches in between
153153the C<location> directives. We can check the example below:
@@ -188,4 +188,4 @@ Again let's check Nginx "debug log":
188188 [debug] 92693#0: *1 using configuration "/bar"
189189
190190As we can tell, Nginx altogether finishes once the C<location>
191- match, and there is no "internal jump ".
191+ match, and there is no "internal redirect ".
0 commit comments