I'm going to start out with stating that I don't understand how to use regular expression, and I don't have the time to learn it in the near future. I've read an article that explains how to do exactly what I need, but when I try and do it, it simply isn't working and breaks the webpage completely (404 errors). Here's the article: IIS url rewrite role except some urls
My issue is, when I create the rewrite in the GUI, even if I type in the website and use 'exact match' instead of 'regular expression', it doesn't rewrite the URL the what it should (or the way I think it should, which I'm obviously wrong).
What I want to do:
- If the client goes to
myweb.site.com
then redirect tomyweb.site.com/login
- Except when going directly to
myweb.site.com/thispage.aspx
Here's the snip from the config file:
<rules>
<rule name="Redirect to Client Login on root lookup" enabled="true" patternSyntax="ExactMatch" stopProcessing="true">
<match url="https://myweb.site.com" />
<conditions logicalGrouping="MatchAny">
<add input="{QUERY_STRING}" pattern="https://myweb.site.com/Default.aspx" negate="true" />
</conditions>
<action type="Rewrite" url="https://myweb.site.com/login" />
</rule>
I'd prefer to do this in the GUI, but if I absolutely must manually edit the config then I'll do so.
Thanks in advance for any help! Sorry for not being more knowledgeable!