the htaccess code to prevent hotlinking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nico-t
    emperor of my world
    • Aug 2004
    • 29903

    #1

    the htaccess code to prevent hotlinking

    what is it? and id also like to know how to put a site in the code that can hotlink, u know like GFY can hotlink when i wanna post some pics here.
  • SplitInfinity
    Confirmed User
    • Dec 2002
    • 3047

    #2
    Example.... have fun! :-)

    RewriteEngine on
    RewriteOptions inherit
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://.*xxxfantasyland.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://.*xxxfantasyland.com:80/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://216.188.105.94/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://216.188.105.94:80/.*$ [NC]
    RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://www.xxxfantasyland.com
    ErrorDocument 404 http://216.188.105.94/pussy/index.html

    Comment

    • nico-t
      emperor of my world
      • Aug 2004
      • 29903

      #3
      Originally posted by SplitInfinity
      Example.... have fun! :-)

      RewriteEngine on
      RewriteOptions inherit
      RewriteCond %{HTTP_REFERER} !^$
      RewriteCond %{HTTP_REFERER} !^http://.*xxxfantasyland.com/.*$ [NC]
      RewriteCond %{HTTP_REFERER} !^http://.*xxxfantasyland.com:80/.*$ [NC]
      RewriteCond %{HTTP_REFERER} !^http://216.188.105.94/.*$ [NC]
      RewriteCond %{HTTP_REFERER} !^http://216.188.105.94:80/.*$ [NC]
      RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://www.xxxfantasyland.com
      ErrorDocument 404 http://216.188.105.94/pussy/index.html
      ok thanks, gonna test it later on

      Comment

      Working...