Mercurial > hg > nginx-site
changeset 810:7c72c3e67e77
The "location" directive: improved wording.
Differentiate between prefix locations and location directive's modifiers.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 10 Jan 2013 19:00:29 +0400 |
parents | 175fa0144ebc |
children | b1465b060921 |
files | xml/en/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_core_module.xml |
diffstat | 2 files changed, 12 insertions(+), 12 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,7 +10,7 @@ <module name="Module ngx_http_core_module" link="/en/docs/http/ngx_http_core_module.html" lang="en" - rev="13"> + rev="14"> <section id="directives" name="Directives"> @@ -1380,8 +1380,8 @@ adjacent slashes into a single slash. <para> A location can either be defined by a prefix string, or by a regular expression. Regular expressions are specified by prepending them with the -“<literal>~*</literal>” prefix (for case-insensitive matching), or with the -“<literal>~</literal>” prefix (for case-sensitive matching). +“<literal>~*</literal>” modifier (for case-insensitive matching), or with the +“<literal>~</literal>” modifier (for case-sensitive matching). To find a location matching a given request, nginx first checks locations defined using the prefix strings (prefix locations). Among them, the most specific one is searched. @@ -1409,12 +1409,12 @@ be used in other directives. </para> <para> -If the most specific prefix location has the “<literal>^~</literal>” prefix +If the most specific prefix location has the “<literal>^~</literal>” modifier then regular expressions are not checked. </para> <para> -Also, using the “<literal>=</literal>” prefix it is possible to define +Also, using the “<literal>=</literal>” modifier it is possible to define an exact match of URI and location. If an exact match is found, the search terminates. For example, if a “<literal>/</literal>” request happens frequently, @@ -1428,7 +1428,7 @@ Such a location cannot obviously contain <note> In versions from 0.7.1 to 0.8.41, if a request matched the prefix location without the “<literal>=</literal>” and “<literal>^~</literal>” -prefixes, the search also terminated and regular expressions were +modifiers, the search also terminated and regular expressions were not checked. </note> </para>
--- a/xml/ru/docs/http/ngx_http_core_module.xml +++ b/xml/ru/docs/http/ngx_http_core_module.xml @@ -10,7 +10,7 @@ <module name="Модуль ngx_http_core_module" link="/ru/docs/http/ngx_http_core_module.html" lang="ru" - rev="13"> + rev="14"> <section id="directives" name="Директивы"> @@ -1366,9 +1366,9 @@ listen 127.0.0.1 default_server accept_f <para> location можно задать префиксной строкой или регулярным выражением. -Регулярные выражения задаются либо с префиксом “<literal>~*</literal>” +Регулярные выражения задаются либо с модификатором “<literal>~*</literal>” (для поиска совпадения без учёта регистра символов), -либо с префиксом “<literal>~</literal>” (с учётом регистра). +либо с модификатором “<literal>~</literal>” (с учётом регистра). Чтобы найти location, соответствующий запросу, вначале проверяются location’ы, заданные префиксными строками (префиксные location’ы). Среди них ищется максимальное совпадение. @@ -1398,12 +1398,12 @@ location’ы могут быть вложенными, с некоторыми исключениями, </para> <para> -Если у максимального совпавшего префиксного location’а указан префикс +Если у максимального совпавшего префиксного location’а указан модификатор “<literal>^~</literal>”, то регулярные выражения не проверяются. </para> <para> -Кроме того, с помощью префикса “<literal>=</literal>” можно задать точное +Кроме того, с помощью модификатора “<literal>=</literal>” можно задать точное совпадение URI и location. При точном совпадении поиск сразу же прекращается. Например, если запрос “<literal>/</literal>” случается часто, то @@ -1415,7 +1415,7 @@ location’ы могут быть вложенными, с некоторыми исключениями, <para> <note> В версиях с 0.7.1 по 0.8.41, если запрос точно совпал с префиксным -location’ом без префиксов “<literal>=</literal>” и “<literal>^~</literal>”, +location’ом без модификаторов “<literal>=</literal>” и “<literal>^~</literal>”, то поиск тоже сразу же прекращается и регулярные выражения также не проверяются. </note>