I am trying to redirect a path e.g. www.something.com/apple/pie to www.something.com/tickets/pie-details but also have some exceptions e.g. www.something.com/apple/helloworld does not get redirected to www.something.com/tickets/helloworld-details
This is what I have tried but doesn't work:
if (req.url ~ "^/apple/.*" && req.url != "^/apple/helloworld") {
set req.url = "^/tickets/.*-details";
error 701 req.url;
}