help with .htaccess

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gin
    Confirmed User
    • Sep 2003
    • 672

    #1

    help with .htaccess

    hey. i think there is alot of hotlinkers stealing images from my server. i want to block all images so fuckers can't hotlink. what i got is this.

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain2.com(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?111.111.111.11(/)?.*$ [NC]
    RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.domain.com/diehotlinker.jpg [R,NC]

    when i put that up.. im getting an error, can anybody help?
  • darksoul
    Confirmed User
    • Apr 2002
    • 4997

    #2
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)domain.com.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://xxx.xxx.xxx.xxx.*$ [NC]
    RewriteCond %{REQUEST_URI} !^/diehotlinker\.jpg$ [NC]
    RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://domain.com/diehotlinker.jpg [R,L]
    1337 5y54|)m1n: 157717888
    BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
    Cambooth

    Comment

    • gin
      Confirmed User
      • Sep 2003
      • 672

      #3
      hey i tried that. it isn't working either. The error im getting is .

      [Mon Sep 29 06:09:46 2003] [alert] [client 68.98.21.11] /home/.htaccess: Invalid command 'RewriteCond', perhaps mis-spelled or defined by a module not included in the server configuration

      Comment

      • darksoul
        Confirmed User
        • Apr 2002
        • 4997

        #4
        You don't have mod_rewrite installed
        1337 5y54|)m1n: 157717888
        BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
        Cambooth

        Comment

        Working...