blacklist for hotlinking

New to mod_rewrite? This is a good place to start.

blacklist for hotlinking

Postby Bruno_me » Fri Aug 19, 2005 9:26 pm

well, basically what I want to do is be able to blacklist a site if they're hotlinking from me.

what I have so far is:
Code: Select all
    RewriteCond %{HTTP_REFERER} ^http://site.to.be.blocked/something [NC]
    RewriteRule .*\.(gif|GIF|jpg|JPG|png|PNG)$ http://my.site/hotlink.jpg [L,R]

the thing that I really need to figure out is the regex to use to for subdomains in the referer, and for the part after the / :P

right now, it only works for http://site.to.be.blocked/something, but I want it to blacklist http://etis.ot.eb.blocked/whatever as well

so what's the best way of going about this?
Bruno_me
 
Posts: 1
Joined: Fri Aug 19, 2005 9:20 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests

cron