How to: Protect your WordPress blog from hotlinking


/ Published in: Apache
Save to your folder(s)

FWIW


Copy this code and paste it in your HTML
  1. RewriteEngine On
  2. #Replace ?mysite.com/ with your blog url
  3. RewriteCond %{HTTP_REFERER} !^http://(. .)?mysite.com/ [NC]
  4. RewriteCond %{HTTP_REFERER} !^$
  5. #Replace /images/nohotlink.jpg with your "don't hotlink" image url
  6. RewriteRule .*.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]

URL: http://www.wprecipes.com/how-to-protect-your-wordpress-blog-from-hotlinking

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.