I'm using IIS 7 with the Microsoft URL Rewrite Module 2.0. I have a simple rule defined to redirect requests to an alternate directory. This part is working fine. However, I want to bypass the rule when a particular Windows user makes a request to the site. The site is configured for Windows authentication. The "LOGON_USER" and "AUTH_USER" params in the incoming request both have the account name in them that I should be able to match on.

I've tried setting the condition {AUTH_USER} - Does Not Match the Pattern - MyDomain\User1 and I've tried {LOGON_USER} - Does Not Match the Pattern - MyDomain\User1

But neither of these worked. When logged on as User1 I am still getting redirected. How do I accomplish this exclusion?

link|improve this question
Did you escape the backslash? It's a regular expression so to make it match that value you have to use ^MyDomain\\User1$. The ^ and $ make sure it only matches that exact value (from beginning to end). Also make sure you have 'Ignore case' enabled to make it case insensitive. – Marco Miltenburg Nov 5 '11 at 21:38
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.