Skip to content

Instantly share code, notes, and snippets.

@jameshulse
Created October 12, 2016 15:21
Show Gist options
  • Save jameshulse/9a7fa61351e334725d09d9d9138f898c to your computer and use it in GitHub Desktop.
Save jameshulse/9a7fa61351e334725d09d9d9138f898c to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="BlockInvalidHosts" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{HTTP_HOST}" pattern="*.justgiving.com" negate="true" />
</conditions>
<action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment