Skip to content

Instantly share code, notes, and snippets.

@herrbischoff
Created April 8, 2015 21:53
Show Gist options
  • Save herrbischoff/a95a54f38812d134d458 to your computer and use it in GitHub Desktop.
Save herrbischoff/a95a54f38812d134d458 to your computer and use it in GitHub Desktop.
Disable hotlinking
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com/.*$ [NC]
#RewriteRule \.(gif|jpg)$ – [F]
#RewriteRule \.(gif|jpg)$ http://www.example.com/wp-content/hotlinking.png [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment