Monday, October 14, 2013

Update On .htaccess

Back in June 2012, I wrote: Educate Pinners With .htaccess with instructions on how to allow pinning... except not of the image that pinners intend to pin, but a substituted image with a message about copyright.

I noticed that this strategy has recently stopped working because Pinterest no longer identifies itself as "Pinterest" in web logs when one of their relentless crowscrapers infringes on your copyright. Now Pinterest is using the longer form: +http://pinterest.com

If you want to continue substituting the pinned images with a copyright warning, you must update your .htaccess file with the following lines:
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} Pinterest [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://media-cache-ec0\.pinterest\.com/upload/44965696249836704_DMXjrNee_f\.jpg [R]

RewriteCond %{HTTP_USER_AGENT} \+http://pinterest\.com/ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://media-cache-ec0\.pinterest\.com/upload/44965696249836704_DMXjrNee_f\.jpg [R]
The command for the old identifier "Pinterest" remains in case they mysteriously revert to it. This is the copyright warning that is being substituted:

No comments: