Direct image display/linking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acctman
    Confirmed User
    • Oct 2003
    • 2840

    #1

    Direct image display/linking

    anyone know the htaccess code to prevent someone from typing in http://www.blah.com/image/something.jpg and showing an image
  • teksonline
    So Fucking Banned
    • Jan 2005
    • 2904

    #2
    mod rewrite

    Comment

    • acctman
      Confirmed User
      • Oct 2003
      • 2840

      #3
      do you have an example

      Comment

      • Lycanthrope
        Confirmed User
        • Jan 2004
        • 4517

        #4
        Basically, just leave off the null referrer statement that is commonly added.

        It should look like this:

        RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com.*$ [NC]
        RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://www.hotlink.url

        However, while this will block direct requests and your freeloading copy and pasters, it will also block spiders.

        Comment

        • acctman
          Confirmed User
          • Oct 2003
          • 2840

          #5
          i'll just use it on the image folder instead of root

          Comment

          Working...