Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>From the <a href="http://wiki.nginx.org/HttpCoreModule#location">HttpCoreModule docs</a>:</p> <ol> <li>Directives with the "=" prefix that match the query exactly. If found, searching stops.</li> <li>All remaining directives with conventional strings. If this match used the "^~" prefix, searching stops.</li> <li>Regular expressions, in the order they are defined in the configuration file.</li> <li>If #3 yielded a match, that result is used. Otherwise, the match from #2 is used.</li> </ol> <p>Example from the documentation:</p> <pre><code>location = / { # matches the query / only. [ configuration A ] } location / { # matches any query, since all queries begin with /, but regular # expressions and any longer conventional blocks will be # matched first. [ configuration B ] } location /documents/ { # matches any query beginning with /documents/ and continues searching, # so regular expressions will be checked. This will be matched only if # regular expressions don't find a match. [ configuration C ] } location ^~ /images/ { # matches any query beginning with /images/ and halts searching, # so regular expressions will not be checked. [ configuration D ] } location ~* \.(gif|jpg|jpeg)$ { # matches any request ending in gif, jpg, or jpeg. However, all # requests to the /images/ directory will be handled by # Configuration D. [ configuration E ] } </code></pre> <p>If it's still confusing, <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#location">here's a longer explanation</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload