Link to home
Create AccountLog in
Avatar of rivkamak
rivkamakFlag for United States of America

asked on

Excluding Ip address in rewrite

I have my rewrite from IIS 7.
One of these rules is causing when I type in my ip address, it's forwarding to the main url instead.
How can I exclude the ip address ***.***.***.*** from redirecting to kars4kids.or
<rules>
                <rule name="LowerCaseRule1" enabled="false" stopProcessing="true">
                    <match url="[A-Z]" ignoreCase="false" />
                    <action type="Redirect" url="{ToLower:{URL}}" />
                </rule>
                <rule name="CanonicalHostNameRule1" enabled="false">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^www\.kars4kids\.org$" negate="true" />
                    </conditions>
                    <action type="Redirect" url="http://www.kars4kids.org/{R:1}" />
                </rule>
                <rule name="INDEX FILES" enabled="false" patternSyntax="Wildcard" stopProcessing="true">
                    <match url="index.*" />
                    <action type="Redirect" url="/" appendQueryString="true" />
                </rule>
            </rules>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer