Announcement

Collapse
No announcement yet.

.htaccess

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    .htaccess

    Having moved to a server where I get charged for bandwidth I am keen to remove hotlinking.

    I am not too bothered about banning all hotlinking in forums as we do receive traffic from them so I don't want to implement a blanket ban.

    I am trying to ban one particular site, and ebay.

    I can ban them using a .htaccess file (details below) but this just leaves an empty place holder. I would like to add an alternate image advertising the website instead, the image is in place but just doesn't load in.

    Any ideas on what I am doing wrong?

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?bloguez\.com/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?omurtlak\.com/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?ebay\.com/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?ebay\.co.uk/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?facebook\.co.uk/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?facebook\.com/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?ebay\.co.uk/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?cgi.ebay\.co.uk/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?tungstenring\.co.uk/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://(.+\.)?livejournal\.com/ [NC]
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ qualitysilver.co.uk/acatalog/Stolen-Image.jpg [L]
    Regards

    Jason

    Titan Jewellery (Swift Design)
    Zirconium Rings
    Damascus Steel Rings

    #2
    This is a test page HERE The image on the left is blocked, the image on the right isn't.

    Any help would be appreciated.

    Kind regards

    Jason
    Regards

    Jason

    Titan Jewellery (Swift Design)
    Zirconium Rings
    Damascus Steel Rings

    Comment


      #3
      If you removed the width statement out of the td on the left the image will show. Looks like the replacement statement in the htaccess file is not working.

      Comment


        #4
        Hi Duncan,

        I have removed this but was just trying to simulate someone dragging the file into their software, as is.

        Jason
        Regards

        Jason

        Titan Jewellery (Swift Design)
        Zirconium Rings
        Damascus Steel Rings

        Comment


          #5
          This might help:
          http://community.actinic.com/showpos...40&postcount=9
          and this:
          http://www.alistapart.com/articles/hotlinking/
          and: http://www.javascriptkit.com/howto/htaccess10.shtml

          I think you may just need to include the full URL path for the image instead of the reletive path.

          Comment


            #6
            Many thanks for taking the time to bring this information to my attention.

            I will read and hopefully succeed.

            Kind regards

            Jason
            Regards

            Jason

            Titan Jewellery (Swift Design)
            Zirconium Rings
            Damascus Steel Rings

            Comment


              #7
              I forgot i cant paste a link to a place that has a great item on hotlinking

              you can try a search though http://www.google.co.uk/search?hl=en...l=&oq=&gs_rfai=

              Comment

              Working...
              X