More Htaccess Help needed

Discussion in 'Apache' started by imvain2, Jun 30, 2009.

  1. #1
    I have two websites that I would like to have access to images, and block the rest. The below code that I have doesn't seem to work.

    I have looked into FAQs about htaccess but couldn't figure out what the problem is.

    
    RewriteCond %{HTTP_REFERER} !^http://freekamasutra.net [NC]
    RewriteCond %{HTTP_REFERER} !^http://freekamasutravideos.net [NC]
    RewriteRule .*\.(jpe?g|png)$ /images/nohotlinking.gif [L]
    
    Code (markup):
    thanks for your help.
     
    imvain2, Jun 30, 2009 IP
  2. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In what way is it not working? Got a link to an image that I can try to hotlink?
     
    Wrighty, Jul 2, 2009 IP
  3. imvain2

    imvain2 Peon

    Messages:
    218
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    imvain2, Jul 2, 2009 IP
  4. Wrighty

    Wrighty Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Wrighty, Jul 2, 2009 IP
  5. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #5
    Try this:
    
    RewriteCond %{HTTP_REFERER} !freekamasutra\.net [NC,OR]
    RewriteCond %{HTTP_REFERER} !freekamasutravideos\.net [NC]
    RewriteRule .*\.(jpe?g|png)$ /images/nohotlinking.gif [L]
    
    Code (markup):
    Hope this works :D
     
    thuankkk, Jul 8, 2009 IP