1. Basic syntax: [basically consistent with the above rewrite regular matching syntax]
Location [=|~|~*|^~]/uri/{...}
* To match case sensitivity * ~* matching for case-insensitive *!~ and!~* are case insensitive and case-insensitive mismatches, respectively
Example 1:
Location =/{ # matches the query/only. # only match/query. }
Matches any query because all requests have been/started. But regular expression rules and long block rules will be matched by precedence and query
Example 2:
Location ^~/images/{ # matches any query beginning With/images/and halts searching, # so regular expressions won't be checked.
# matches any queries that have been/images/and stops searching. Any regular expressions will not be tested.
Example 3:
Location ~*. (Gif|jpg|jpeg) $ { # matches any request ending in gif, JPG, or JPEG. However, all # requests to the/images/directory'll be handled by } # matches any requests that have an end of GIF, JPG, or JPEG.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.