lookahead regex in nginx location -


i'm trying match /category/anything, except /category/paid in nginx location.

i have following regex, it's not working. google tells me can use lookahead in nginx. doing wrong?

location ^/category(?!/paid)/ {  } 

you either need slash before or escaped slash.

location ~ (category/(?!paid)) { .. } location ~ (category\/(?!paid)) { .. } 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -