Skip to content

Instantly share code, notes, and snippets.

@AntMooreWebDev
Created March 10, 2021 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntMooreWebDev/610537c169289248a98ab839bf77bcf2 to your computer and use it in GitHub Desktop.
Save AntMooreWebDev/610537c169289248a98ab839bf77bcf2 to your computer and use it in GitHub Desktop.
How to add a redirect rule that is ignored if accessed from a specific IP
<rule name="[Rule name]" stopProcessing="true">
<match url="[URL to match]" ignoreCase="false" />
<conditions>
<add input="{REMOTE_HOST}" pattern="^[ip.\address]" ignoreCase="false" negate="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="[Target URL]" />
</rule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment