I'm looking to use htaccess to prevent image hotlinking. Will this in any way affect google image traffic as they do show preview of images surfers perform image searches?
if you block all of the sites, it will effect google image bot but you can allow it with your .htaccess
Would you have htaccess code that is google friendly but prevents anyone else from hotlinking. Here's what I found on the net RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://([-a-zA-Z0-9_]+\.)?domain.com.*$ [NC] RewriteRule \.(jpe?g|gif|bmp|png|ico)$ - [F,NC,L]
I did this, but had problems at first because my web hosting company had implemented their own hotlink protection without my knowledge, and there was some kind of incompatibility until I got it straighened out. So you need to be careful.