Colin Ogilvie (csogilvie) wrote in lj_userdoc,
Colin Ogilvie
csogilvie
lj_userdoc

  • Mood:
  • Music:

How can I stop LiveJournal users from using my bandwidth by configuring my Apache server?

This FAQ (73) has the following text in it:
RewriteEngine on 
RewriteCond %{HTTP_REFERER} !^$ 
RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ [NC] 
RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC] 
RewriteCond %{REQUEST_URI} !^/okay_image\.jpg 
RewriteCond %{REQUEST_URI} !^/okay_image2\.gif 
RewriteCond %{REQUEST_URI} !^/another/okay_image3\.jpg 
RewriteCond %{REQUEST_URI} !^/final/okay_image\.gif 
RewriteRule .*\.(jpg|gif)$ - [F] 

Unfortunatley, that code is wrong... it should be:
RewriteCond %{HTTP_REFERER} !^http://domain\.com/.*$ [NC] 
RewriteCond %{HTTP_REFERER} !^http://www\.domain\.com/.*$ [NC] 
as it correctly states further down the page.

Not a major change :)
Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments