This link has been bookmarked by 91 people . It was first bookmarked on 02 Mar 2006, by Paul Terry Walhus.
-
10 Nov 14
-
14 Aug 14
-
17 May 13
-
27 Jan 13
-
27 Sep 11
-
06 Jun 11
-
30 Sep 09
-
18 Jun 09
-
-
Put all the images you wish to protect from being stolen (bandwidth-wise) in a separate directory.
-
Create an ASCII text file named .htaccess and save it in that directory. Note that the name starts with a fullstop (or period) and is entirely in small letters (ie, lowercase). Cut and paste (unless you're using IE 6 in which case you just have to type it yourself) the following lines into that file:
SetEnvIfNoCase Referer "^http://www.your-domain-name-here.com/" locally_linked=1 SetEnvIfNoCase Referer "^http://www.your-domain-name-here.com$" locally_linked=1 SetEnvIfNoCase Referer "^http://your-domain-name-here.com/" locally_linked=1 SetEnvIfNoCase Referer "^http://your-domain-name-here.com$" locally_linked=1 SetEnvIfNoCase Referer "^$" locally_linked=1 <FilesMatch "\.(gif|png|jpe?g)$"> Order Allow,Deny Allow from env=locally_linked </FilesMatch>
Change "your-domain-name-here.com" to your real domain name. If your site can be accessed using other domain names (eg "www.your-domain-name-here.net"), be sure to add an additional SetEnvIfNoCase line for each of those domain names (with the URLs appropriately changed to the URLs of your domains. On the other hand, if your site can only be accessed using one domain, for example, using only "www.your-domain-name-here.com", then delete the line with "http://your-domain-name-here.com". The cut and paste code above caters to the usual case where most sites can be accessed with or without the "www" prefix.
Do not correct my spelling in the code snippet given above. "Referer" (with only one "r" in the middle of the word) is the word that needs to go into the .htaccess file - do not change it to "Referrer".
Steps to Take
Protecting your images using a .htaccess file is trivial.
-
-
-
16 Dec 08
-
11 Jun 08
-
30 Apr 08
-
19 Apr 08
-
14 Apr 08
-
24 Mar 08
-
01 Mar 08
-
29 Feb 08
-
24 Feb 08
-
29 Nov 07
-
26 Sep 07
-
19 Jul 07
Antonio JozzolinoTecnica para previnir o uso de imagens hospedadas no seu site por outros sites.
-
12 Jun 07
-
18 Apr 07
-
25 Mar 07
-
16 Mar 07
-
08 Feb 07
-
25 Nov 06
-
04 Nov 06
-
04 Jun 06
-
11 Feb 06
Bruce WayneSetEnvIfNoCase Referer "^http://www.your-domain-name-here.com/" locally_linked=1 SetEnvIfNoCase Referer "^http://www.your-domain-name-here.com$" locally_linked=1 SetEnvIfNoCase Referer "^http://your-domain-name-here.com/" locally_linked=1 SetEnvIfNoCase R
-
25 Jan 06
-
17 Jan 06
-
30 Dec 05
realia realiaThis article provides another solution to the problem of bandwidth theft, one that does not require the webmaster to modify any existing web pages nor install any scripts.
-
27 Dec 05
-
22 Dec 05
-
-
The solution outlined in this article requires your site to be hosted on a machine using the Apache web server and that your web host allows you to override the server's configuration using a .htaccess file. For the more technically inclined, it uses the facilities provided in the mod_setenvif Apache module.
-
-
Dave McIntyreAn article from thesitewizard.com that explains how to set a .htaccess file to prevent image theft.
-
21 Dec 05
-
12 Dec 05
-
10 Jan 05
-
03 Sep 04
-
22 Jun 04
-
21 Jun 04
-
20 Jun 04
-
18 Mar 04
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.