I have an image site of sorts and often get heavy traffic, not to the pages the images are on but to the images themselves. I've set up a script that has created copies of the original image with a small watermark that points them to my homepage.
The problem is displaying this alternate image only when the traffic is coming from an outside source. I have the htaccess code and as far as I can tell it's all good, but when I set it loose, I get a 500 internal service error.
This is what I have. The images are all in mydomain.com/images/ and the watermarked images are all in mydomain.com/images/watermark/. All the images are jpg's and all have a name that is a number.
The 500 error only comes on when the referrer is not my site. They display correctly when I go to the image directly for example. Am I doing anything wrong? Could this be a server configuration?Code:RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://([-a-z0-9]+\.)?mydomain\.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule ^images/(.*)\.jpg$ /images/watermark/$1\.jpg [L]






Bookmarks