Hotlinking Hotlinking
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Hotlinking

Started by troublemaker, November 30, 2003, 06:33:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

troublemaker

QuoteI think you can drop an .htaccess file in the directory(ies) and limit which sites are allowed to hotlink off of you site.

Code:

LoadModule rewrite_module     libexec/mod_rewrite.so


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$  
RewriteCond %{HTTP_REFERER} !^http://yoursite.com/.*$      [NC]

 



In mine I have to do both http://yoursite.com and http://www.yoursite.com to work. I could be wrong but i think that would work. Also, I am also not sure at what level you would want to drop it into your site but I think it would be the root folder.
will this work? i just want to try and keep others from saveing my files easyly and hot linking
Site Admin's @ coppermine kick much techie @$$

Oasis

preventing people from saving your files, no it won't help.
preventing people from hot linking, yes it will help.

Put it in the "albums" folder.
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

troublemaker

LoadModule rewrite_module     libexec/mod_rewrite.so


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$  
RewriteCond %{HTTP_REFERER} !^http://www.mysite.com/*.*/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.ws/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.ws/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.ws/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysiteip/.*$  
RewriteCond %{HTTP_REFERER} !^http://www.mysite.com/index.php.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.com/.*$      [NC]
with and with out the   [NC]  and get same error
error being no imagesworking on thr page in the album folder
Site Admin's @ coppermine kick much techie @$$

Oasis

Here.... This is what I use:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?photo.enctu.org(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?stunion.enctu.org(/)?.*$     [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|tif|png)$ http://photo.enctu.org/noleech.jpg [R,NC]


http://photo.enctu.org/noleech.jpg is the picture that appears when they try to hotlink.

Also, make sure url rewriting is enabled on your server.
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

troublemaker

just copy and edit ?
or do I need the extra stuff in the top bar
Site Admin's @ coppermine kick much techie @$$

epsilon

In what directorie i must put this htaccess?

Joachim Müller

albums folder will do.

GauGau

epsilon

When i put the .htaccess to protect my images i dont see the images in my web site, broken thumbnails, etc... :(  :roll:  What can i do? Only if i delete the .htaccess the gallery runs well. . .. .

Joachim Müller

post the code of the .htaccess file you used here.

GauGau

epsilon

I tried all in htaccess my server has rewrite mode ON This is the php info of my server http://www.cremita.com/phpinfo.php and i dont know what fails but i get (forbidden acess to the server error) you are not authorized to... I cant see the images in the web of /album when .htaccess is here, please help me, i really need to do that.