Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_core_module.xml @ 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 | 32b8498cfb40 |
children | ddd22f571529 |
comparison
equal
deleted
inserted
replaced
809:175fa0144ebc | 810:7c72c3e67e77 |
---|---|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
9 | 9 |
10 <module name="Module ngx_http_core_module" | 10 <module name="Module ngx_http_core_module" |
11 link="/en/docs/http/ngx_http_core_module.html" | 11 link="/en/docs/http/ngx_http_core_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="13"> | 13 rev="14"> |
14 | 14 |
15 <section id="directives" name="Directives"> | 15 <section id="directives" name="Directives"> |
16 | 16 |
17 <directive name="aio"> | 17 <directive name="aio"> |
18 <syntax> | 18 <syntax> |
1378 </para> | 1378 </para> |
1379 | 1379 |
1380 <para> | 1380 <para> |
1381 A location can either be defined by a prefix string, or by a regular expression. | 1381 A location can either be defined by a prefix string, or by a regular expression. |
1382 Regular expressions are specified by prepending them with the | 1382 Regular expressions are specified by prepending them with the |
1383 “<literal>~*</literal>” prefix (for case-insensitive matching), or with the | 1383 “<literal>~*</literal>” modifier (for case-insensitive matching), or with the |
1384 “<literal>~</literal>” prefix (for case-sensitive matching). | 1384 “<literal>~</literal>” modifier (for case-sensitive matching). |
1385 To find a location matching a given request, nginx first checks | 1385 To find a location matching a given request, nginx first checks |
1386 locations defined using the prefix strings (prefix locations). | 1386 locations defined using the prefix strings (prefix locations). |
1387 Among them, the most specific one is searched. | 1387 Among them, the most specific one is searched. |
1388 Then regular expressions are checked, in the order of their appearance | 1388 Then regular expressions are checked, in the order of their appearance |
1389 in a configuration file. | 1389 in a configuration file. |
1407 Regular expressions can contain captures (0.7.40) that can later | 1407 Regular expressions can contain captures (0.7.40) that can later |
1408 be used in other directives. | 1408 be used in other directives. |
1409 </para> | 1409 </para> |
1410 | 1410 |
1411 <para> | 1411 <para> |
1412 If the most specific prefix location has the “<literal>^~</literal>” prefix | 1412 If the most specific prefix location has the “<literal>^~</literal>” modifier |
1413 then regular expressions are not checked. | 1413 then regular expressions are not checked. |
1414 </para> | 1414 </para> |
1415 | 1415 |
1416 <para> | 1416 <para> |
1417 Also, using the “<literal>=</literal>” prefix it is possible to define | 1417 Also, using the “<literal>=</literal>” modifier it is possible to define |
1418 an exact match of URI and location. | 1418 an exact match of URI and location. |
1419 If an exact match is found, the search terminates. | 1419 If an exact match is found, the search terminates. |
1420 For example, if a “<literal>/</literal>” request happens frequently, | 1420 For example, if a “<literal>/</literal>” request happens frequently, |
1421 defining “<literal>location = /</literal>” will speed up the processing | 1421 defining “<literal>location = /</literal>” will speed up the processing |
1422 of these requests, as search terminates right after the first | 1422 of these requests, as search terminates right after the first |
1426 | 1426 |
1427 <para> | 1427 <para> |
1428 <note> | 1428 <note> |
1429 In versions from 0.7.1 to 0.8.41, if a request matched the prefix | 1429 In versions from 0.7.1 to 0.8.41, if a request matched the prefix |
1430 location without the “<literal>=</literal>” and “<literal>^~</literal>” | 1430 location without the “<literal>=</literal>” and “<literal>^~</literal>” |
1431 prefixes, the search also terminated and regular expressions were | 1431 modifiers, the search also terminated and regular expressions were |
1432 not checked. | 1432 not checked. |
1433 </note> | 1433 </note> |
1434 </para> | 1434 </para> |
1435 | 1435 |
1436 <para> | 1436 <para> |