Free Ringtone - Mortgages - Shares - Mobile Phones - Car Credit

PDA

View Full Version : How do you redirect google images traffic to another url?


mightyb
Apr 16th 2006, 5:41 pm
Is there a way to redirect traffic when they click on my image on google images? Im quite crap with .htaccess

Im getting a lot of hits from here...

http://images.google.com/imgres?imgurl=http://www.daily3gp.com/pics/d4.gif&imgrefurl=http://www.daily3gp.com/&h=150&w=180&sz=13&tbnid=Dz8_XKSqDFyblM:&tbnh=80&tbnw=96&hl=en&start=1&prev=/images%3Fq%3Dasia%2Bgirls%2Bnude%26svnum%3D10%26hl%3Den%26lr%3D

Thanks!

edit-

How do i adjust this:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/ebay\.html$
RewriteCond %{HTTP_REFERER} ^http://(cgi\.)?ebay\.com [NC]
RewriteRule \.html?$ /ebay.html [NC,L]

For http://images.google.com ? Any ideas? Ta!

Kat2
Apr 16th 2006, 6:50 pm
Here's a generator that will do it for you.

http://www.htmlbasix.com/disablehotlinking.shtml

You'll type in domains you *want* to allow to hotlink - basically your own. All others will be blocked. Hit Block Blank Referers if you want to. You can choose to type in where to direct the user instead, or an image to replace it (e.g. one that says "don't steal bandwidth.")

I did a quick one for you, that allows only your domain to hotlink, blocks blank referers, and redirects them to your main page:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?daily3gp.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.daily3gp.com/ [R,NC]

ryan_uk
Apr 16th 2006, 6:52 pm
Maybe:

SetEnvIfNoCase Referer ".*images.google.*" GoogleImages
order deny,allow
deny from env=GoogleImages

It's not a redirect but a bandwidth saver.

Off topic: by the way, you probably need more space between images and the google ads.

mightyb
Apr 16th 2006, 7:16 pm
Kat2

Great, thanks!

ryan_uk

Yea, im testing a new positioning etc Ta!

ryan_uk
Apr 16th 2006, 7:28 pm
Good luck!

by the way, it's possible to also direct all image requests through a php script, too. This can be helpful if you want to hide the images true location. I wrote an article (http://blueeyedpaul.blogspot.com/2006/03/part-1-preventing-image-hotlinking-web.html) with the script included.

mightyb
Apr 16th 2006, 7:34 pm
I have actually managed to find a script that will do it but have not tested it.