1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Prevent theft of your files [.png, .txt, .jpg, .rar, .gif ...]

Discussion in 'Web Development' started by RLZ, Dec 7, 2016.

  1. RLZ

    RLZ C Sharp Programmer

    212
    270
    238
    Credits:
    1,628
    Hello, Often without knowing your site is victim theft file causing a slowdown of your site including your bandwidth. I could go through about ten websites with our our smilies gif or smileys etc. Here is how these leechers blocked. In your .htaccess

    code:
    RewriteCond% {HTTP_REFERER}! (I.e.
    RewriteCond% {HTTP_REFERER} ^ http (s): // your field [NC] (www \.)?
    RewriteCond% {HTTP_REFERER} ^ http (s): // google.com [NC] (www \.)?
    RewriteCond% {http_REFERER} ^ http (s): // google.fr [NC] (www \.)?
    RewriteCond% {HTTP_REFERER} ^ http (s): // bing.com [NC] (www \.)?
    RewriteCond% {HTTP_REFERER} ^ http (s): // yahoo.com [NC] (www \.)?
    RewriteCond% {HTTP_REFERER} ^ http (s): // facebook.com [NC] (www \.)?
    RewriteCond% {HTTP_REFERER} ^ http (s): // twitter.com [NC] (www \.)?
    RewriteRule \. (JPG | jpeg | png | gif | bmp | tiff | peak | mp3 | doc | xls | mpeg | mpg | ram | rm | wma | wav | ASX | wmv | avi | zip | rar | exe |
    Please login or register to view links or downloads!
     
    iHax_dani likes this.
  2. Harry

    Harry I'm 'Serious'ly a better Developer

    1,105
    904
    398
    Credits:
    4,939
    This hurts my eyes.
    Is it possible you can give us an example.
    Take this site for an example :smile:
     
    iHax_dani likes this.

Share This Page