Results 1 to 5 of 5
  1. #1

    Excluding Sites from Hotlinking

    Is there anyway to allow hotlinking, while excluding certain sites?

  2. #2
    use .htaccess.

    check out the following:

  3. #3
    Site was helpful, although once I add the code to my current .htaccess I get an error! Here is the code w/ error:

    Options +FollowSymLinks
    ErrorDocument 404 /errors/404.gif
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^eagleimg\.com
    RewriteRule ^(.*)$$1 [R=permanent,L]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?badsite\.net/ [NC,OR
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?badsite\.com/ [NC
    RewriteRule \.(jpe?g|gif|bmp|png)$ images/nohotlink.jpg [L]
    RewriteRule ^index.htm index.php
    RewriteRule ^syndication.htm syndication.php
    RewriteRule ^sidebar.htm sidebar.php
    RewriteRule ^bookmark.htm bookmark.php
    RewriteRule ^copyright.htm copyright.php
    RewriteRule ^privacy.htm privacy.php
    RewriteRule ^contact.htm contact.php
    RewriteRule ^tos.htm tos.php
    RewriteRule ^link.htm link.php
    RewriteRule ^donate.htm donate.php
    RewriteRule ^hotlinking.htm hotlinking.php
    RewriteRule ^support.htm support.php
    RewriteRule ^tos.htm tos.php
    Got any clues?

  4. #4
    you could use php headers:
    save this as image.php
    $bannedsite = "";
    $bannedsite2 = "";
    $img = $_GET[img];
    if($HTTP_REFERRER==$bannedsite || $HTTP_REFERER==$bannedsite2) {
    /*do nothing*/
    else {
    /*show image*/
    header("Content-type: image/gif");
    then do <img src="http://yoursite/image.php?img=mydesktop">
    and if its a banned site then walla its banned.

  5. #5
    Unfortunatly I cannot do that, although thanks much for your help. Ideally i'd need a .htaccess file.

    I tried the above code alone and it still produced an error (just the exclude code)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts