Forum Moderators: phranque
I want ALL of my images to be blocked from other sites.I am thinking of attemping the Htaccess script to help stop theives.
I have been just renaming images,but that has become too much work.been taking 2 hours a day to stop the leachers.
Any links on a simple tutorial on how to go about installing the htaccess file? Since I want all images blocked,do I put the file in my top directory?
Any other help or links would be great.Im very confused on where to start...,im sure my host allows me to do this(ipowerweb).
thanks.
1) Open a text editor
2) Cut and paste:
RewriteCond %{HTTP_REFERER}!^http://yoursite.com/ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.yoursite.com/ [NC]
RewriteRule [^/]+.(gif¦jpg)$ - [F]
3) change yoursite.com as appropriate
4) save as .htaccess
5) upload to your images folder
6) check your site and make sure it still works :)
so I added that htaccess to my images directory,and it doesnt work..
called back and got a new tech,and he said his sup said it wasnt available at this time,but they sounded like they didnt know what it was exactly...
I want to call them again later,what exactly do I need to ask for...so they will understand..Im not sure how to word my question..
thanks.
[webmasterworld.com...] - simple tips to stop image thieves
[webmasterworld.com...] - some tech advice on htaccess
Good luck.
this is what came up for loaded modules.
Loaded Modules mod_log_bytes, mod_bwlimited, mod_php4, mod_frontpage, mod_ssl, mod_setenvif, mod_so, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core
so it looks like its installed,but why doesnt my htaccess changes work?is there something else i can do?
is there more info on my phpinfo.php page i need to look at to find out?
thanks.
1) Open a text editor
2) Cut and paste:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^http://(www\.)?yoursite\.com [NC]
RewriteRule \.(gif¦jpeg?¦jpg)$ - [F]
Note that the forum software eats the space character preceding the "!" in the RewriteCond, and often modifies the "¦" character as well.
HTH,
Jim
Once you get that working, you may wish to experiment with this version. It allows for visitors whose browsers or proxy caches do not provide a referrer, and also allows various search engine caches and translation utilities to properly display your images.
Because of the number of people on the 'net whose ISP's use caching proxies, it's a good idea to allow a blank referrer, although this is an imperfect solution.
Allowing the search engine caches and translators to display your images is completely optional, depending on your market. However, I suggest allowing all of them unless you have a really good reason not to. Otherwise, your site will appear broken to anyone using them.
Options +FollowSymlinks
RewriteEngine on
# Block image inclusion outside our domain except Google, AltaVista, Gigablast, Comet Systems, and SearchHippo translators and caches
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://216\.239\.(3[2-9]¦[45][0-9]¦6[0-3]).*(www\.)?yourdomain\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://babel.altavista.com/.*(www\.)?yourdomain\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://216\.243\.113\.1/cgi/
RewriteCond %{HTTP_REFERER} !^http://search.*\.cometsystems\.com/search.*(www\.)?yourdomain\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://.*searchhippo\.com.*(www\.)?yourdomain\.com [NC]
RewriteRule \.(gif¦jpg¦jpeg?)$ - [NC,F]
Jim
"Yes, you can use .htaccess files on our servers. You can use the file manager to create and edit .htaccess files.."
so it looks like I have to go through my cpanel to do this,im gonna give that a shot.Is having to go through my cpanel normal?
I definately want to allow search engines to cache my page..so im gonna do some more searching in the forums.
thanks to everyone for the help,you guys are wonderful...
Options +FollowSymlinks
RewriteEngine on
# Block image inclusion outside our domain except Google, AltaVista, Gigablast, Comet Systems, and SearchHippo translators and caches
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(www\.)?yourdomain\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://216\.239\.(3[2-9]¦[45][0-9]¦6[0-3]).*(www\.)?yourdomain\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://babel.altavista.com/.*(www\.)?yourdomain\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://216\.243\.113\.1/cgi/
RewriteCond %{HTTP_REFERER}!^http://search.*\.cometsystems\.com/search.*(www\.)?yourdomain\.com [NC]
RewriteCond %{HTTP_REFERER}!^http://.*searchhippo\.com.*(www\.)?yourdomain\.com [NC]
RewriteRule \.(gif¦jpg¦jpeg?)$ - [NC,F]
also,what do I add to the code to redirect to a picture with my domain name advertisement for hotlinkers..
thanks alot,awesome help!
RewriteRule .*[Jj][Pp][Gg]$¦.*[Gg][Ii][Ff]$ [yoursite.com...]
you can make the URL to an image or anything you want...
Good Luck!
The following rules are variants you might want to try:
RewriteRule \.(gif¦jpg¦jpeg?)$ - [NC,F]
RewriteRule \.(gif¦jpg¦jpeg?)$ /extra_special.$1 [NC]
RewriteRule \.(gif¦jpg¦jpeg?)$ /hotlinker.html [NC]
It is not necessary to provide a method and domain name (http://yourdomain.tld) in the target URI, unless you wish to redirect off-site. If that is the case, then you must use [NC,R] or [NC,R=301] as the flags at the end of the rule.
As to whether you want to stop Google and AV translators, and SearchHippo from displaying your images, that is a marketing question for some, and a privacy issue for others.
Jim