Mercurial > hg > nginx-site
changeset 1879:3685d90e133e
Documented the "absolute_redirect" directive.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 26 Dec 2016 23:25:26 +0300 |
parents | 127ae107e5a9 |
children | 89e132c9ee34 |
files | xml/en/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_core_module.xml |
diffstat | 2 files changed, 52 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml +++ b/xml/en/docs/http/ngx_http_core_module.xml @@ -10,10 +10,30 @@ <module name="Module ngx_http_core_module" link="/en/docs/http/ngx_http_core_module.html" lang="en" - rev="64"> + rev="65"> <section id="directives" name="Directives"> +<directive name="absolute_redirect"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>on</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>1.11.8</appeared-in> + +<para> +If disabled, redirects issued by nginx will be relative. +</para> + +<para> +See also <link id="server_name_in_redirect"/> +and <link id="port_in_redirect"/> directives. +</para> + +</directive> + + <directive name="aio"> <syntax> <literal>on</literal> | @@ -1930,7 +1950,8 @@ Prior to version 1.9.5, the default valu <context>location</context> <para> -Enables or disables specifying the port in redirects issued by nginx. +Enables or disables specifying the port in +<link id="absolute_redirect">absolute</link> redirects issued by nginx. </para> <para> @@ -2461,8 +2482,8 @@ Detailed description of server names is <para> Enables or disables the use of the primary server name, specified by the -<link id="server_name"/> -directive, in redirects issued by nginx. +<link id="server_name"/> directive, +in <link id="absolute_redirect">absolute</link> redirects issued by nginx. When the use of the primary server name is disabled, the name from the <header>Host</header> request header field is used. If this field is not present, the IP address of the server is used.
--- a/xml/ru/docs/http/ngx_http_core_module.xml +++ b/xml/ru/docs/http/ngx_http_core_module.xml @@ -10,10 +10,30 @@ <module name="Модуль ngx_http_core_module" link="/ru/docs/http/ngx_http_core_module.html" lang="ru" - rev="64"> + rev="65"> <section id="directives" name="Директивы"> +<directive name="absolute_redirect"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>on</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>1.11.8</appeared-in> + +<para> +Если запрещено, то перенаправления выдаваемые nginx'ом, будут относительные. +</para> + +<para> +См. также директивы <link id="server_name_in_redirect"/> +и <link id="port_in_redirect"/>. +</para> + +</directive> + + <directive name="aio"> <syntax> <literal>on</literal> | @@ -1927,7 +1947,9 @@ open_file_cache_events on; <context>location</context> <para> -Разрешает или запрещает указывать порт в перенаправлениях, выдаваемых nginx’ом. +Разрешает или запрещает указывать порт в +<link id="absolute_redirect">абсолютных</link> +перенаправлениях, выдаваемых nginx’ом. </para> <para> @@ -2459,8 +2481,9 @@ server { <context>location</context> <para> -Разрешает или запрещает использовать в перенаправлениях, выдаваемых nginx’ом, -основное имя сервера, задаваемое директивой +Разрешает или запрещает использовать в +<link id="absolute_redirect">абсолютных</link> перенаправлениях, +выдаваемых nginx’ом, основное имя сервера, задаваемое директивой <link id="server_name"/>. Если использование основного имени сервера запрещено, то используется имя, указанное в поле <header>Host</header> заголовка запроса.