View Full Version : Protect Photos
dunhill
21st of December 2003 (Sun), 08:16
Pekka,
I have noticed that someone has used teleport to grap my enitire site, is there anything I can do to prevent that ?
I cant password protect the directory as EE needs to read it.
Any ideas?
Pekka
21st of December 2003 (Sun), 09:37
There is .htaccess directive in Apache which lets you restrict all certain MIME type calls to your domain only. This means people can't directly fetch images unless they are "called" by your html/php pages.
But to restrict view of entire pages - that is not possible without passwords, as it simply blocks all visitors, too.
TomKa
21st of December 2003 (Sun), 14:54
Try this code for your .htaccess:
************************************
SetEnvIfNoCase Referer "^http://www.mydomain.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://www.mydomain.com$" locally_linked=1
SetEnvIfNoCase Referer "^http://mydomain.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://mydomain.com$" locally_linked=1
SetEnvIfNoCase Referer "^$" locally_linked=1
Order Allow,Deny
Allow from env=locally_linked
ErrorDocument 403 http://www.mydomain.com
*************************************
With the last line you can redirect to another page.
dunhill
21st of December 2003 (Sun), 16:57
Thanks for your help.
I have tried that code, but it made it when I accessed my site that no images were displayed.
THis code was already there is
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mysite.com/.*$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
I tried adding your code directly below this code, is that correct?
Thank YOU
dunhill
21st of December 2003 (Sun), 20:28
I tried that, it doesn't stop teleport as teleport replicates the entire site using the site links, it doesn't have a referrer problom.
TomKa
22nd of December 2003 (Mon), 01:49
On this page there are some good hints, look for "StopBadBots.htaccess":
http://reviewed.homelinux.org/webdesign/htaccess/
Another "BadBot example":
http://www.webmasterworld.com/forum13/1823.htm
I don't know if this works 100% with Teleport, because in the "Setup - Netiquette" of Teleport you can change the Agent Identity.
If you want to protect your images you can use PTCrypt from PanoTools to encrypt your jpg files, you have to setup EE to view every image with the java applet PTViewer.
The PTCrypt add-on can be found in the files section of http://groups.yahoo.com/group/PanoTools
Maybe Pekka has some idea to prevent site grabbing with a php script.
dunhill
22nd of December 2003 (Mon), 05:05
TomKa,
Thank you very much for you feedback, I will look at your suggestions and ideas.
TomKa
30th of December 2003 (Tue), 07:34
Here is another system, it works also with a java applet: http://www.artistscope.com/secure_image/pro/user-guide.htm
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.