Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Problem with googlebot and htaccess


ro101 - 3:33 pm on Feb 3, 2013 (gmt 0)


Hi all,

I have a problem with my site. I'm trying to watermark all my images in order to prevent hotlinking from other sites but I have a weird problem.

Apparently it is working fine, the watermark is shown, but if I have a look of my page from avivadirectory.com/bethebot/ to see hows googlebot "sees" my site, I see that the images appear with the watermark too.

I know that something should be changed in .htaccess to let Googlebot and Googlebot-Image see all my pictures without that watermark, but can't figure out what.

This is what I have in my htaccess right now. Note that I added two lines for the google bot agents, but they are not working. Anyone has an idea? Thanks a lot.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !Googlebot [NC]
RewriteCond %{HTTP_USER_AGENT} !Googlebot-Image [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.mysite.com [NC]
RewriteRule ^(.*\.(png|gif|jpe?g))$ http://www.mysite.com/wp-content/plugins/watermarknewplugin/watermark.php?img=$1 [L]
</IfModule>


Thread source:: http://www.webmasterworld.com/apache/4542026.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com