rewrite rule to redirect all users except for specific IP's

Jason 1 Reputation point

We are going to be doing some maintenance on one of our pages and need to redirect all traffic to the maintenance page except for a list of admin IP's so they can work on site. I'm a novice at this but have looked around and found some ideas particularly with rewritemaps. I have come up with the below but when I test the pattern matching in IIS the result is always a pass as per the picture. Any tips on what I am doing wrong?

<?xml version="1.0" encoding="utf-8"?>  
                <clear />  
                <rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true">  
                    <match url="(.*)" />  
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">  
                        <add input="{HTTPS}" pattern="off" />  
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />  
                <rule name="Online services maintenance" enabled="false" stopProcessing="true">  
                    <match url="(.*)" />  
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">  
                        <add input="{Authorised Admin IPs:{REQUEST_URI}}" pattern="1" negate="true" />  
                    <action type="Redirect" url="" appendQueryString="false" redirectType="Temporary" />  
                <rewriteMap name="Authorised Admin IPs" defaultValue="0">  
                    <add key="" value="1" />  
                    <add key="localhost" value="1" />  
                    <add key="::1" value="1" />  


Internet Information Services
{count} votes