Skip to content

Instantly share code, notes, and snippets.

@JamoCA
Created August 8, 2014 21:29
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 JamoCA/6cdbff05f93ada5bf89e to your computer and use it in GitHub Desktop.
Save JamoCA/6cdbff05f93ada5bf89e to your computer and use it in GitHub Desktop.
IIS 7 Web Font Hosting Rules for Emigre Web Fonts. Disables hotlinking & directory listing.
<?xml version="1.0" encoding="UTF-8"?>
<!-- IIS 7 Disable hotlinking and directory listing. http://www.emigre.com/EULWEB.php -->
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Hotlinking Prevention" stopProcessing="true">
<match url=".*\.(woff|eot)$" />
<conditions>
<add input="{HTTP_REFERER}" pattern="^https?://www\.yourdomain\.com/.*$" negate="true" />
<add input="{HTTP_REFERER}" pattern="^$" />
</conditions>
<action type="AbortRequest" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment