Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Feb 2004
    Location
    Danvers Massachussets
    Posts
    8
    Member #
    4963
    I found this code on a teenybopper site, but it comes in quite handy. Not my code, i lost the url of the the site, so the credit goes to this unknown site. enjoy



    Stop Direct Linking


    Hate it when people direct link your images which slows your site down, and can even use up so much space it gets closed? Here's how to stop direct linkers. Note: If you are hosted on a free server, you probably won't need this as people won't be able to direct link anyway in most cases.

    1. Copy this code and paste into a new page:

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


    2. Change yoursite.com to your actual URL, then save your file as .htaccess

    If you want the direct linked images to appear as your own image (such as 'OMG you stole this image from http://yoursite.com!'), rather than a red cross, read on >
    3. Repeat this tutorial, but instead of using the code in step one, use this one instead:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com/.*$ [NC]
    RewriteRule \.(gif|jpg)$ http://www.yoursite.com/image.gif [R,L]


    4. Don't forget to change yoursite.com to your URL, and call the image you make for stealers/direct linkers 'image.gif', or change that bit of the code as well to fit your image name.


    ****My addition to this tutorial: for the image, u can use some kind of box saying things like: "I stole this image from 'this and this.com'" or "kill me, i'm a direct linker" etc.etc.etc.****

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:41 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com