lighttpd + hotlink protection? How?

Discussion in 'Hosting' started by Canadian, Sep 8, 2017.

  1. Canadian

    Canadian Member

    Joined:
    Aug 7, 2017
    Messages:
    286
    Trophy Points:
    16
    Gender:
    Male
    I´m using lighttpd, but when I use apache i did a protection for my images on cpanel like this:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://domain.com.br/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain.com.br$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.com.br/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.com.br$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain2.com.br/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain2.com.br$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain2.com.br/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain2.com.br$ [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

    So, how can I put this to work on lighttpd?
     

Share This Page