Forum Moderators: phranque

Message Too Old, No Replies

Blocking Google Images

...for a day?

         

norbiu

10:48 am on Sep 17, 2006 (gmt 0)

10+ Year Member



Is there a way to block users who are coming from Google Images? I don't want to do the robots.txt trick because that would take too much.

Is there something I could use in .htaccess? Thanks.

norbiu

1:07 pm on Sep 17, 2006 (gmt 0)

10+ Year Member




Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_REFERER} images.google\.com [NC,OR]
RewriteCond %{HTTP_REFERER} images.google\.fi [NC,OR]
RewriteCond %{HTTP_REFERER} images.google\.es [NC,OR]
RewriteCond %{HTTP_REFERER} images.google\.de [NC]
RewriteRule .* - [F]

I tried using this, but it seems that it blocks the whole google.com domain. Is there a way to only block images.google.com?

elngy

1:44 pm on Oct 3, 2006 (gmt 0)

10+ Year Member



If I understand the objective correctly, this may achieve what's wanted:

RewriteCond %{HTTP_REFERER} /imgres\?imgurl [OR]

What happens, at least on 2 sites I manage, is that when a user clicks on a google thumbnail image, which normally results in one's entire html page being downloaded, the google site frame that would otherwise display the html page instead displays the forbidden message (or whatever the RewriteRule does).

People who somehow manage to search for html pages from the domains images.google.* do not get blocked, they can access html pages. It's only the ones that were searching for images and clicking on the thumbnails that get blocked.

Hope that's of some help.