Web master resource directory
Search  
Search Ezine directory    More search options
Get PERMANENT DIRECT TEXT LINKS from Webmasters-central directory for Only $20.00 !
Black Line
HOME ADD A LINK MODIFY A LINK NEW LINKS COOL LINKS TOP RATED GET RATED SEARCH LOGIN
Black Line

Web site Protection Tutorial------------------------------------------Go To Article Index


Keep an INDEX file | File permissions | Stop email robots to get your email address | Protect your downloads | Protect your affiliate links | Image protection |

Image protection.

1. Disable Right click:

You can use little javascript to stop people copying your images. But they can view the image urls with 'view>>source' feature of the browser and can copy your images.

Here is the javascript. You have to paste it in the <head>...</head> tags of your html code.

<SCRIPT>function click() {if (event.button==2) {alert('Ooops...\nRight click is disabled!');}}document.onmousedown=click// - -></SCRIPT>

Demo: Right click on this page. You will see the alert box.

2. .htaccess method:

By using '.htaccess' file:When you are on Apache server and you are enabled 'Rewrite Mode' on your server.Just ask your web host that you are Rewrite mode enabled.

You have to keep a '.htaccess' file in the root directory, if you want to protect your entire domain images from hot linking.Or if you want to protect images in one folder you can keep this file in that particular folder.

How to create the '.htaccess' file:

1.Open your Notepad or any text editor.

2.Paste these lines-

Rewriteengine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.your_other_domain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.yourdomain.com/error.gif

Third,fourth and fifth lines are with your domain names or domain names that you want to give access to your image files. You can add any domain names like this.

Change 'yourdomain' to your web site names.

You can add or delete file extentions as per your requirement in the last line and replace error.gif with your gif name.

Save this as 'htaccess' on your computer.

3.Upload this file by ASCII mode by your FTP software.

4.Rename it as .htaccess.We can not access the files that starts with a 'period'.

3. Using CGI sctipts:

If you don't have 'Rewrite Mode' on your server, you can use CGI scripts to protect your images and variety of files.

Some of the scriupts for that purpose are:

Ace Bandwidth Protector:An excellent FREE script! See the demo on the web site.

Antileech: Free cgi script that protects your files.Easy to install with help files.

Bandwidth Protector:Designed to stop the unauthorized linking of your website graphics (and now HTML pages too!) from other websites, thereby using your bandwidth to deliver graphics to other website pages.Script is $49.00 to register.

Link Protect: Prevent unauthorized access to your web images and content, Check that the call for your image(s) is from an authorized site, Eliminate bandwidth abuse completely, Record the user details and visits to the protected content. The script is $35.00.But these people charge for support.


webmasters-central.com Copy Right© 2002 - Present. All Rights Reserved.
All the material and content belongs to webmasters-central.com except otherwise specified.
Resources and links are provided for informational purpose only. We don't endorse or recommend the products listed on our website. Use them at your own judgement.
Private Policy