Skip to content

Instantly share code, notes, and snippets.

@mahdiyazdani
Created September 29, 2016 23:48
Show Gist options
  • Save mahdiyazdani/f39351c5d693e6cfb019c198291bfdee to your computer and use it in GitHub Desktop.
Save mahdiyazdani/f39351c5d693e6cfb019c198291bfdee to your computer and use it in GitHub Desktop.
Disable Hotlinking
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment