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
Post a Comment