Forum Moderators: Robert Charlton & goodroi
[edited by: tedster at 3:11 am (utc) on Feb 6, 2010]
google.cn (China)
google.co.id (Indonesia)
google.ru (Russia)
google.com.ph (Philippines)
google.com.vn (Vietnam)
google.com.sg (Singapore)
google.co.jp (Japan)
google.co.th (Thailand)
google.co.kr (Korea)
Starting out of Asia... though I too only see the behaviour on google.com.my (where I'm currently located)
Accessing by IP (64.233.181.106 .my) gives the old behaviour.
I have the first reports of it from .ru and .kr from back in Oct 2009.
Can anyone else in Asia confirm this?
Anyway - be prepared - here is a .htaccess (Apache mod_rewrite) rule that unfortunately doesn't quite work on the google gallery as intended - due the imglanding page using ajax to hotlink to the image (it fails to load rather than displaying a protest message) - but issuing a 302 Redirect is a lot less server and bandwidth heavy. Also disables general hot-linking from elsewhere.
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://([a-zA-Z0-9\-]+)\.yourdomain\.com [NC]
RewriteRule ^(.*\.jpg)$ http://www.example.com/no-hotlinking-example.jpg [R=302,L]
The example above allows yourdomain.com and subdomains of one level - don't use (.+) as google have your domain in their gallery.
Ps. If you're using Amazon s3 or other cloud service this could get very expensive very quickly.
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/no-hotlinking-example.jpg$
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://([a-zA-Z0-9\-]+)\.yourdomain\.com [NC]
RewriteRule ^(.*\.jpg)$ http://www.example.com/no-hotlinking-example.jpg [R=302,L]
I've a different approach;
httdp.conf for the cdn/file server
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
Header append Vary Referer<FilesMatch "\.(gif|jpg|jpeg|png|ico)$">
Header set Cache-Control "max-age=31536000, public"
</FilesMatch>
<FilesMatch "\.(doc|mov|mp4|pdf|ppt|rtf|xls|zip)$">
Header set Cache-Control "max-age=3600, public"
</FilesMatch>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www|cdn)\.domain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|doc|mov|mp4|pdf|ppt|rtf|xls|zip)$ /cdn/index.html
index.html
...
//redirect to the main page if javascript is disabled
<meta http-equiv="Refresh" content="1; URL=http://www.domain.com/">
...
<body onload="window.location='http://www.domain.com/detectfile?file='+self.location">
...
CDN serves index.html instead of the hotlinked file (with no-cache header), index.html redirects to the script on server, and the script finds the page url with that image/file and redirects to it.
But thumbnails were placed at the right side not at the bottom at that time.
Anyhow I can see it everytime I search here in Japan.
a screen capture of the new interface
[edited by: Robert_Charlton at 8:04 pm (utc) on Feb. 2, 2010]
Isn't it about time a major search company busts out their OWN content
114.59.#*$!.yyy - - [03/Feb/2010:01:34:07 +0000] "GET /Photos/example.jpg HTTP/1.1" 200 55499 http://images.google.co.id/imglanding?q=example&imgurl=http://img5.example.com/Photos/example.jpg&imgrefurl=http://www.example.com/Photos/&usg=nj23nf8h3jh23hd23=&h=450&w=600&sz=55&hl=id&um=1&itbs=1&tbnid=-fNs9eAwwXm1TM:&tbnh=101&tbnw=135&prev=/images%3Fq%3Dexample%26hl%3Did%26sa%3DG%26um%3D1&sa=G&um=1&start=0 Please note this is already happening with your images
images.google.co.id/imglanding
BTW, how to automatically embed watermark to image when it serve to display?
Best if it doesn't need to modify html or php.