I have two websites that I would like to have access to images, and block the rest. The below code that I have doesn't seem to work. I have looked into FAQs about htaccess but couldn't figure out what the problem is. RewriteCond %{HTTP_REFERER} !^http://freekamasutra.net [NC] RewriteCond %{HTTP_REFERER} !^http://freekamasutravideos.net [NC] RewriteRule .*\.(jpe?g|png)$ /images/nohotlinking.gif [L] Code (markup): thanks for your help.
Here is a "Clean" (non adult) image. http://freekamasutra.net/images/error_icon.png The code seems to work for freekamasutra.net referal, but not freekamasutravideos.net
change: RewriteCond %{HTTP_REFERER} !^http://freekamasutra.net [NC] RewriteCond %{HTTP_REFERER} !^http://freekamasutravideos.net [NC] to: RewriteCond %{HTTP_REFERER} !^http://freekamasutra(videos)?.net [NC]
Try this: RewriteCond %{HTTP_REFERER} !freekamasutra\.net [NC,OR] RewriteCond %{HTTP_REFERER} !freekamasutravideos\.net [NC] RewriteRule .*\.(jpe?g|png)$ /images/nohotlinking.gif [L] Code (markup): Hope this works