Skip to content

Instantly share code, notes, and snippets.

@markdcraftww
Created May 28, 2013 12:13
Show Gist options
  • Save markdcraftww/5662329 to your computer and use it in GitHub Desktop.
Save markdcraftww/5662329 to your computer and use it in GitHub Desktop.
Prevent others hotlinking your images on WordPress
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment