Forum Moderators: phranque
Her site is on a Cobalt 550 running Apache. There has to be a way to block him from doing this isn't there?
Better effectiveness can be had using a scripted approach, where you set and check cookies before serving images or protected content. But this requires an investment of significant time and complicates your site. You can also simply change the filenames periodically to 'break' the hotlinks.
The only 100% solution to theft of copyrighted images involves attorneys, but even that may not work if the thief is in a country with loose copyright laws or enforcement.
Jim
In .htaccess:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example\.com
RewriteRule \.(gif夸pe?g在mp如ng¦wav妃p3安mv地vi妃pe?g)$ - [NC,F]
Jim
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://(www\.)?MYDOMAIN\.com
RewriteRule \.(gif¦jpeg¦bmp¦png¦wav¦mp3¦wmv¦avi¦mpeg)$ - [NC,F]
Any ideas? Maybe its something to do with "mod_rewrite" or something that would cause me NOT to be able to do this?
[edited by: jdMorgan at 5:05 pm (utc) on Jan. 20, 2006]
[edit reason] Included code, removed URL per TOS. [/edit]
The code is good, so it's likely a configuration problem, such as mod_rewrite not loaded or not allowed with your current config.
You can try commenting out the "Options" line. It may not be needed and it may not be allowed. If both are true, then the code might work without it.
Jim
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://(www\.)?MYDOMAIN\.com
RewriteCond %{HTTP_REFERER} !^http://(www\.)?CLIENT1_DOMAIN\.com
RewriteCond %{HTTP_REFERER} !^http://(www\.)?CLIENT2_DOMAIN\.com
RewriteRule \.(gif夸peg在mp如ng安av妃p3安mv地vi妃peg)$ - [NC,F]
But if you know all the domains of all the websites that access these images, then you could add more Rewrite Conditions to allow other domain names access.
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example\.com ## existing line ##
RewriteCond %{HTTP_REFERER} !^http://subdomain\.example\.com
RewriteCond %{HTTP_REFERER} !^http://(www\.)?otherdomain\.com
RewriteCond %{HTTP_REFERER} !^http://(www\.)?andanother\.org
RewriteCond %{HTTP_REFERER} !^http://(www\.)?andanother\.net
Adding the above conditions would probably work too. Plus the above won't get hosed if the IP addresses of the sites ever change some day (?).
Good luck!
I posted this message on another site looking for help but to no avail:
So I have been researching this ALL DAY and found all kinds of things about modifying the .htaccess file to block this dude from stealing images.Here is what makes this a unique situation. We are running Apache with hundreds of similar websites that are sharing the same images. So instead of having each and every website have its very own copy of each image, we decided to save space, and have one folder (and rewrote part of the httpd.conf file to make it work) but now there is a site (not hosted by us) that is hardlinking images from one of my clients on his site
How do I block this guy? I have pretty well tried everything I have found online. I even found a nice tool <snip>
If I take my clients site XYZ.com and add a .htaccess file there and paste the results gathered by the above link then I get an Internal Server Error. So I decided to go into the Shared Folder regiion and added the .htaccess file there. But the problem is that not only is the STEALERS images not work, but none of our clients on that server work either
So, hopefully, you can see the uniqueness of this situation. I even tried a DENY FROM with the stealers' IP Address but to no avail. I'm sure all of the code that htmlbasix.com provided would work under normal circumstances, but not working for me with this.
Maybe editing the http.conf file would be a solution perhaps? Thank you guys for your time once again and hopefully I can stop this idiot!
[edited by: jdMorgan at 10:57 pm (utc) on Jan. 20, 2006]
[edit reason] Repaired formatting. Removed URL per TOS. [/edit]