Hi everyone, I'm seeing a huge increase in hotlinking to images on my site - particularly with referrals from the far east. A whole page of mine will be posted to a forum with translated text and hotlinks to my images.
I don't particularly mind this, but I'm beginning to be concerned about BW.
It occurred to me that I could use htaccess to rewrite the URL to redirect image request from off-site to the a Coral Cached version.
I came up with this, and I'm looking for a reality check.
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{QUERY_STRING} !(^¦&)coral-no-serve$
RewriteRule images/(.*)$ http://example.com:8080/images/$1 [R,L]
I mixed anti-hotlinking examples and the example from the Coral CDN page and it seems to work.
Does it look robust to you Mod_ReWrite experts?
Am I correct that it will not effect search engine spiders?
Any other unforeseen issues?
Thanks!
V0h.
[edited by: jdMorgan at 4:03 am (utc) on Mar. 28, 2007]
[edit reason] Examplified, disabled smileys in code. [/edit]