How do I disable direct-linking?
No webdesigner likes it when visitors direct-link their files. It eats up our bandwidth and costs us money. Bandwidth theft is a big problem for those with free graphics sites. If your site has a problem with direct-linkers than this is the best choice for you. This code shows you how to disable rght-clicking on your web pages so that it is almost impossible for people to plagiarise your work or steal your bandwidth. Note: This code applies to all your webpages.


Requirements:
1. Must own your own domain, or have a free host that allows you to upload .htaccess files
Copy and paste This Code:
Open notepad and copy and paste the following code in it

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]


Replace the 'yoursite.com' with the name of your domain and save this file as .htaccess. If you already have a .htaccsess file, you can just add the above code anywhere in it. Upload the .htaccess file to your domain's root directory. If your host supports mod rewrite (which most sites do), then this code should work and it will disable direct linking of .jpg and .gif images from your site.


That's it! Easier than you thought, huh?



Tututorial by: Nika
Last Modified: 07/31/08.




October 18 2008: Added 6 New Transparent PNGs!

October 4 2008: Added One New Div Layout and 2 New Transparent PNGs!
6 New Transparent PNGs

New Div Layout

4 New CSS Templates

Valid HTML 4.01 Strict Valid CSS


eXTReMe Tracker

Users Online
AFFILIATES