I'm trying to match /category/anything, except /category/paid in nginx location.
I have the following regex, but it's not working. Google tells me that I can use lookahead in nginx. Am I doing something wrong?
location ^/category(?!/paid)/ {
}
You either need a slash before it or an escaped slash.
location ~ (category/(?!paid)) { .. }
location ~ (category\/(?!paid)) { .. }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With