What's the difference between "=" and "^ ~" when nginx location matches uri?

There are several ways for

nginx location to match Uris. Where the "=" matches a string exactly, and if it matches, there is no more regular matching and other rules. "^ ~" is also a matching string, so there will be no regular matching in the future, but will it continue to match other strings? What"s the difference between the two?

Jul.18,2022

= has a higher priority than ^ . = will not be matched by ^ if it can match. Search [nginx priority] to see more

Menu