mod rewrite (hotlink protection) & google
I'm no expert on mod rewrite but I am using it to prevent most hotlinking to images on my server.It is in the .htaccess file
Linux
Apache 1.3.33 (Unix)
Control Panel
I've looked at the apache docs and searched far and wide for a clear answer, but found none so far.
Here is the problem: While I am able to block hotlinking, and although I've "allowed" google to the best of my ability (and yahoo and msn), it seems like I'm preventing them from indexing new images and I just spotted what appears to be a wildcard or sub url issue with google:
Open this link to check.
If you view that link, it will be a google image search result. That should be a clean, working link. But it is broken, as if blocked by the .htaccess file.
However, clicking the "view the image full size" link on that page opens the correct file.
I think one of the issues is the sheer number of variations on the google domain and the wildcard issues this raises for "allowing."
The lines of allow code specific to google look like this:
Code:
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(images\.)?google.com(/)?.*$ [NC]
Code:
RewriteRule .*\.(gif|jpg|jpeg|bmp|wmv|png)$ - [F,NC]
There are google national domains (.ca for Canada, and .de for Germany)... it would be insane to try and add each one by hand.
Then there is video.google.com, etc.
While I wish to keep the hotlink protection, I really want these images indexed, searchable and linkable at google, etc.
Any help would be very much appreciated.
Thanks,
Craig