Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mysite1.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mysite2.com(/)?.*$ [NC]
RewriteRule .*\.(gif¦jpg¦jpeg¦bmp)$ http://www.mysite2.com/theft/anti_theft_image.gif [R,NC] Basically it just lets mysite1 and mysite2 hotlink to the images. If any other site attempts to hotlink it subsitutes the anti_theft_image.gif .
Someone also suggested that it might be a firewall that's changing the value of {HTTP_REFERER} to some proprietary value. What do you think?
Good luck, Dave
[edited by: jdMorgan at 4:15 pm (utc) on Oct. 14, 2005]
[edit reason] No URLs, please. See TOS. [/edit]
Do you have any other still-working mod_rewrite code, or any other working .htacess code of any kind?
Some simple tests would be in order to find out if you can still use .htaccess at all, or if mod_rewrite has been disabled. Your code is not pretty, but it should work as-is.
Jim