Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Hotlinking  (Read 7103 times)

0 Members and 1 Guest are viewing this topic.

troublemaker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
    • http://www.clynefan.com
Hotlinking
« on: November 30, 2003, 06:33:14 am »

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

Code:
Code: [Select]

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
Logged
Site Admin's @ coppermine kick much techie @$$

Oasis

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 252
  • iNSiGNiA
    • Pixnet Gallery
Hotlinking
« Reply #1 on: November 30, 2003, 08:01:52 am »

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.
Logged
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

troublemaker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
    • http://www.clynefan.com
Hotlinking
« Reply #2 on: December 06, 2003, 08:18:46 pm »

Code: [Select]
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
Logged
Site Admin's @ coppermine kick much techie @$$

Oasis

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 252
  • iNSiGNiA
    • Pixnet Gallery
Hotlinking
« Reply #3 on: December 07, 2003, 11:35:24 am »

Here.... This is what I use:

Code: [Select]
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.
Logged
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

troublemaker

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
    • http://www.clynefan.com
Hotlinking
« Reply #4 on: December 08, 2003, 12:47:37 am »

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

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
Directory?
« Reply #5 on: December 09, 2003, 03:28:23 pm »

In what directorie i must put this htaccess?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Hotlinking
« Reply #6 on: December 09, 2003, 05:33:31 pm »

albums folder will do.

GauGau
Logged

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
Error when i put the htaccess...
« Reply #7 on: December 10, 2003, 09:07:57 pm »

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. . .. .
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Hotlinking
« Reply #8 on: December 13, 2003, 08:55:53 pm »

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

GauGau
Logged

epsilon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 95
    • http://www.cremita.com
I tried the 3 htacces codes of this topic and error...
« Reply #9 on: December 15, 2003, 07:25:20 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 19 queries.