Nginx matching rule []

 

 

location / {

       root html;

}


Spaces Default match, ordinary match

All matches


= Precise match

= / Only match / access / after less than


~ * Match the regular expression, case insensitive

~* /

* Representatives are not case sensitive

 

~* \.(GIF|png|bmp|jpg|jpeg)

Matching suffix for these formats (GIF | png | bmp | jpg | jpeg) files (matching fixed format file)


Match the regular expression, case sensitive

~ \.(GIF|png|bmp|jpg|jpeg)

Remove the asterisk represents the precise case-insensitive regular expressions


^ ~ Request starting with a character path

- on behalf of regular expressions

The representative of the non

^ ~ On behalf of not using regular expressions

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Published 53 original articles · won praise 0 · Views 812

Guess you like

Origin blog.csdn.net/G971005287W/article/details/105251523