From d4eeedc3a0e5125ef1b1a1fed247318e5de0dcf1 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 14 Aug 2007 20:02:09 +0000 Subject: r1354 merge: named location --- src/http/ngx_http.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/http/ngx_http.c') diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index c6bc6c581..6c5acd94d 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -402,6 +402,7 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) cmcf->phase_engine.server_rewrite_index = (ngx_uint_t) -1; + cmcf->phase_engine.location_rewrite_index = (ngx_uint_t) -1; find_config_index = 0; use_rewrite = cmcf->phases[NGX_HTTP_REWRITE_PHASE].handlers.nelts ? 1 : 0; use_access = cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers.nelts ? 1 : 0; @@ -443,6 +444,14 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) continue; + case NGX_HTTP_REWRITE_PHASE: + if (cmcf->phase_engine.location_rewrite_index == (ngx_uint_t) -1) { + cmcf->phase_engine.location_rewrite_index = n; + } + checker = ngx_http_core_generic_phase; + + break; + case NGX_HTTP_POST_REWRITE_PHASE: if (use_rewrite) { ph->checker = ngx_http_core_post_rewrite_phase; -- cgit