Posted By

iTony on 11/11/08


Tagged

images apache hotlinking


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

brent-man
AshMan


Simple Hotlinking in Apache


 / Published in: Apache
 

  1. RewriteEngine On
  2. RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
  3. RewriteCond %{HTTP_REFERER} !^http://(.+\.)?google\.com/ [NC]
  4. RewriteCond %{HTTP_REFERER} !^http://(.+\.)?bloglines\.com/ [NC]
  5. RewriteCond %{HTTP_REFERER} !^$
  6. RewriteCond %{REQUEST_FILENAME} !hotlink.png$
  7. RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://mysite.com/img/hotlink.png [L]

Report this snippet  

You need to login to post a comment.