Jump to content

Hotlink protection enabled


Axel Wers

Recommended Posts

Posted

This feauture could be applied on smilies directory as well not only uploads directory.

I found unknown chat room where they has stolen my smilies, smilies were linked from my board, but I copied .htaccess file from my uploads directory to directory where I have smilies and now they have big No Permissions image instead of smilies :P :P :P

Posted

hotlink protection really isn't an IPB feature. It's Apache functionality that anyone can setup (static html pages, or web applications, doesn't matter).

Posted

Axel,

In the .htaccess file in your forum root (or you can put it the .htaccess file that's in your public_html folder, to make it site-wide), add the following lines *after* the "DirectoryIndex" line :

RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mydomain.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|avi|mov|wma|wmf|wmv|doc|pps|xls)$ /leecher.html [R,NC]

Substitute "mydomain.com" with your own domain name, but leave the remainder of each line as shown.

I created a page titled "leecher.html" and placed in public_html, so that's why the last line references it. You can use any page name you wish, as long as it's in the public_html directory for that Domain of yours, then change "leecher.html" to the name you've used.

It's one easy option, anyway, and prevents hotlinking of all the filetypes listed in the last line. You can add filetypes as you see fit, but follow the example as shown.

Posted

Hm I don't know what is wrong, but it works only when I want to protect files in uploads directory I have to put htaccess there (to uploads directory).
If I put that htaccess file to root directory it doesn't work.

OK please move this topic somewhere other.

Posted

Well, the presence of an .htaccess in a directory "below" public_html will override the one in public_html.

But if you add the above to your upload directory's .htaccess and it works, then problem solved!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...