.htaccess Hotlink Protection

Discussion in 'Apache' started by A-Q, May 19, 2008.

  1. #1
    Hi,

    I'm using hotlink protection for images and swf files. When someone steals gif or swf from my site, it is redirecting to my hotlink.gif file. But i want to use html file instead of gif. How can i do that? Is it possible?
     
    A-Q, May 19, 2008 IP
  2. Trusted Writer

    Trusted Writer Banned

    Messages:
    1,370
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #2
    change the last line of your rewrite rule to something like this,

    
    RewriteRule .*\.(bmp|jpg|jpeg|gif|png|tif|swf)$ /your-page.html [R,L]
    
    
    Code (markup):
     
    Trusted Writer, May 20, 2008 IP
  3. ahmadfarhan

    ahmadfarhan Peon

    Messages:
    211
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    And you have to have the rewrite condition to matach only to your server.
    Can't remember the condition off the top of my head right now.

    Anyway, if you use cpanel, there's a handy little section that does this automaticly for you.
     
    ahmadfarhan, May 25, 2008 IP
  4. zmanblog

    zmanblog Active Member

    Messages:
    180
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    60
    #4
    can anyone help with hotlink protection for .jad files!? Thankssss
     
    zmanblog, Jun 3, 2011 IP