[PLUGIN] Anti-HotLink

Hello. TNX.
can you tell me more information about Anti-HotLink and what is this plugin do?

TNX again.
 
@ozgurerdogan

This has been implemented now.

@nimafire,@congkai

The plugin still works with the latest version. So you can still install it.
 
with the new version 0.5 when i enable or disable the this plugin i recive this error for the .htaccess file:

I'll just tweak your website settings..
Setting up anti-hotlinking..
HTTPS: Deleting anti-hotlinking code
Warning: fopen(/home/mydomain/domains/mydomain.com/private_html/.htaccess): failed to open stream: No such file or directory in /usr/local/directadmin/plugins/hotlink/user/index.html on line 152 Warning: fwrite(): supplied argument is not a valid stream resource in /usr/local/directadmin/plugins/hotlink/user/index.html on line 153 Warning: fclose(): supplied argument is not a valid stream resource in /usr/local/directadmin/plugins/hotlink/user/index.html on line 154 Warning: chgrp(): No such file or directory in /usr/local/directadmin/plugins/hotlink/user/index.html on line 156 Warning: chmod(): No such file or directory in /usr/local/directadmin/plugins/hotlink/user/index.html on line 157 Warning: chown(): No such file or directory in /usr/local/directadmin/plugins/hotlink/user/index.html on line 158 Hotlinking plugin is enabled for mydomain.com

I'm sure that if I make/create the .htaccess file i dont recive this error, but i have a lot of noob customers!!! :cool:

Can you fix it with a simple "if" pls?!?!
 
Please Help

I installed the plugin sucessfully into my Direct admin panel.
I enabled it for the domain name: www.edesi.us for the extension: mp3
I created a test html file on another domain: http://xclusivebhangra.net/test.html
And when you click the link on the test html file located on a different domain it allows the user to download the file !??
Though, both domains are on the same server, is that the reason or what?
 
#--ANTI-HOTLINK--
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^(http://|https://)(www.)?(edesi.us).*$ [NC]
RewriteRule \.(jpeg|gif|bmp|png|mp3)$ banner.gif [L]

#++ANTI-HOTLINK++
 
the problem is occuring because the mp3s are not located in : /home/user/domain/edesi.us/mp3folder
they are located in /home/user/mp3folder
and i have set up an alias in apache settings which reads from that folder like edesi.us/new will go to :/home/user/mp3folder
I have placed the same htacess file in that folder but it doesn't work !
i have tried placing a single mp3 file in /home/user/domain/edesi.us/mp3folder and it works..but not when my files are located in /home/mp3 or elsewhere up from the root folder of the domain...how can i make it work ?
 
The files located in /home/[user]/domains/[domainname]/[public/private_html]/ (and all subs) will be caught by the .htaccess. All other folders don't!

If you manually edited you apache configuration files and added a alias to the folder. Then you probably have to enable .htaccess files for that directory in the httpd configuration file:

AllowOverride AuthConfig

and place a symlink or copy the .htaccess file to that dir.
 
Error when trying to activate plug in for domain

Just installed OK. Tried running on 1 domain and received this:

Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 101 is not allowed to access /home/USERACCOUNT/domains/ owned by uid 522 in /usr/local/directadmin/plugins/hotlink/user/index.html on line 9 Warning: opendir(/home/USERACCOUNT/domains/): failed to open dir: Inappropriate ioctl for device in /usr/local/directadmin/plugins/hotlink/user/index.html on line 9 Warning: readdir(): supplied argument is not a valid Directory resource in /usr/local/directadmin/plugins/hotlink/user/index.html on line 10

No domains found!

Any ideas??
Thanks, David
 
Last edited:
Hotlink protection of images with .htaccess

hey guys this thread about hotlink is great, and nice plugin :D

btw I'm gonna put here Hotlink protection of images with .htaccess if you you wanna take a look, I'm just want to share ...
Code:
http://www.htaccesstools.com/hotlink-protection/
Use this generator to create a .htaccess file for hotlink protection of your images and pictures. Hotlink protection can save you lots of bandwidth by preventing other sites from displaying your images.

After you have created a .htaccess for hotlink protection, you can use our tool to test hotlink protection.
Code:
http://www.htaccesstools.com/test-hotlink-protection/
Just for fun :)
 
i want actibe hotlink for one domain that not allow direct downlaod fot example file on domain1.com and when user type address directly can not download and when click on link on domain2.com can download file
can you help me?
 
Back
Top