When creating Internet Information Server url rewrites, which are far different than the standardized Apache and Nginx formats you have access to the graphical editor that is more confusing than helpful, but found this to be helpful when I was debugging a url rewrite hijacking another web applications http requests.

Given - Create url that redirects based on some keyword of the http request path in this case the following sample url request

http://localhost/ZZ

Want to match on the ZZ portion of the request, so this rule was in place but then someone wrote another web application that was loaded on this same web server and it had a path like

http://localhost/OtherApp/locations/ZZ

Now this request is getting hijacked by the above rule so you have to adjust the rule by an exclusion under the conditions in that if you see OtherApp in the request url then don't do this rule.  Came up with this condition to fix the redirect rule

Now the "Does Not Match the Pattern" sets this request redirect not to mess with OtherApp valid http requests.