View Single Post
Old 06-24-2007, 11:01 PM  
footmonkey
Confirmed User
 
Industry Role:
Join Date: Nov 2005
Posts: 639
Quote:
Originally Posted by Wolfy View Post
(I don't want to disable hotlinking completely.)

You can block individual sites by using this:

RewriteCond %{HTTP_REFERER} ^http://(.+\.)?site\.com/ [NC]

such as:

RewriteCond %{HTTP_REFERER} ^http://(.+\.)?fusker\.lv/ [NC]



but what if I want to block every site that has the text "fusker" anywhere in the url? How do I do that?
Try this...
RewriteCond %{HTTP_REFERER} !^www\.mysite\.com
RewriteCond %{HTTP_REFERER} !^$

1) says only allow referrers that are your own site
2) says don't block if there's no referrer

Hope it helps
footmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote