# HG changeset patch # User Ruslan Ermilov # Date 1357830029 -14400 # Node ID 7c72c3e67e77a5f06fdd95f46f6ee723ace2de05 # Parent 175fa0144ebc3f5d700c56cd59d4b093a2bc876e The "location" directive: improved wording. Differentiate between prefix locations and location directive's modifiers. diff -r 175fa0144ebc -r 7c72c3e67e77 xml/en/docs/http/ngx_http_core_module.xml --- a/xml/en/docs/http/ngx_http_core_module.xml Thu Jan 10 13:27:27 2013 +0000 +++ b/xml/en/docs/http/ngx_http_core_module.xml Thu Jan 10 19:00:29 2013 +0400 @@ -10,7 +10,7 @@ + rev="14">
@@ -1380,8 +1380,8 @@ A location can either be defined by a prefix string, or by a regular expression. Regular expressions are specified by prepending them with the -“~*” prefix (for case-insensitive matching), or with the -“~” prefix (for case-sensitive matching). +“~*” modifier (for case-insensitive matching), or with the +“~” 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 @@ -If the most specific prefix location has the “^~” prefix +If the most specific prefix location has the “^~” modifier then regular expressions are not checked. -Also, using the “=” prefix it is possible to define +Also, using the “=” 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 “/” request happens frequently, @@ -1428,7 +1428,7 @@ In versions from 0.7.1 to 0.8.41, if a request matched the prefix location without the “=” and “^~” -prefixes, the search also terminated and regular expressions were +modifiers, the search also terminated and regular expressions were not checked. diff -r 175fa0144ebc -r 7c72c3e67e77 xml/ru/docs/http/ngx_http_core_module.xml --- a/xml/ru/docs/http/ngx_http_core_module.xml Thu Jan 10 13:27:27 2013 +0000 +++ b/xml/ru/docs/http/ngx_http_core_module.xml Thu Jan 10 19:00:29 2013 +0400 @@ -10,7 +10,7 @@ + rev="14">
@@ -1366,9 +1366,9 @@ location можно задать префиксной строкой или регулярным выражением. -Регулярные выражения задаются либо с префиксом “~*” +Регулярные выражения задаются либо с модификатором “~*” (для поиска совпадения без учёта регистра символов), -либо с префиксом “~” (с учётом регистра). +либо с модификатором “~” (с учётом регистра). Чтобы найти location, соответствующий запросу, вначале проверяются location’ы, заданные префиксными строками (префиксные location’ы). Среди них ищется максимальное совпадение. @@ -1398,12 +1398,12 @@ -Если у максимального совпавшего префиксного location’а указан префикс +Если у максимального совпавшего префиксного location’а указан модификатор “^~”, то регулярные выражения не проверяются. -Кроме того, с помощью префикса “=” можно задать точное +Кроме того, с помощью модификатора “=” можно задать точное совпадение URI и location. При точном совпадении поиск сразу же прекращается. Например, если запрос “/” случается часто, то @@ -1415,7 +1415,7 @@ В версиях с 0.7.1 по 0.8.41, если запрос точно совпал с префиксным -location’ом без префиксов “=” и “^~”, +location’ом без модификаторов “=” и “^~”, то поиск тоже сразу же прекращается и регулярные выражения также не проверяются.