Skip to content

Instantly share code, notes, and snippets.

@juniovitorino
Created May 15, 2013 22:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save juniovitorino/5587839 to your computer and use it in GitHub Desktop.
Save juniovitorino/5587839 to your computer and use it in GitHub Desktop.
Hotlink Protection
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?youralloweddomain.com [NC]
RewriteRule \.(jpeg|jpg|gif|pdf)$ - [NC,F,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment