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: Preventing Hotlinking...??  (Read 4484 times)

0 Members and 1 Guest are viewing this topic.

zoomingrocket

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Preventing Hotlinking...??
« on: November 21, 2004, 10:02:25 am »

I read the FAQ of coppermine and accordingly made the following .htaccess file:

SetEnvIfNoCase Referer "^http://www.domian.com/cpg/" locally_linked=1
SetEnvIfNoCase Referer "^http://domain.com/cpg" locally_linked=1
SetEnvIf Referer "^$" locally_linked=1
<FilesMatch "\.(gif|png|jpe?g)$">
  Order Allow,Deny
  Allow from env=locally_linked
</FilesMatch>

As per the instruction the file was uploaded to my albums folder!
Now the big problem is, all the thumbnails on the mail page are itself blocked!
I hovered my mouse and found that they are using full paths,
i.e. http://www.domain.com/cpg/albums/fil.jpg

How to modify so that CPG script uses the local reference, i.e. all img src should be local links, like: /cgp/albums/file.jpg ?? instead of the complete path?

Or is there some other way around to prevent hotlinking?

Note: Here 'domain' is the name of my website! And i am not disclosing so as to prevent any further hotlinking!!


REgards,
Zooom..!!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Preventing Hotlinking...??
« Reply #1 on: November 21, 2004, 10:03:57 am »

post the actual content of the .htaccess file with the actual domain name, so we can check.

Joachim
Logged

zoomingrocket

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Preventing Hotlinking...??
« Reply #2 on: November 21, 2004, 11:25:58 am »

This is my exact .htaccess file in the albums folder

Code: [Select]
SetEnvIfNoCase Referer "^http://www.indianguitartabs.com/igtalbum"

locally_linked=1
SetEnvIfNoCase Referer "^http://indianguitartabs.com/igtalbum"

locally_linked=1
SetEnvIf Referer "^$" locally_linked=1
<FilesMatch "\.(gif|png|jpe?g)$">
  Order Allow,Deny
  Allow from env=locally_linked
</FilesMatch>

On the main page, when i hover my mouse, i see that it shows the complete link, i.e.
http://www.indianguitartabs.com/igtalbum/albums/file.jpg  in the <img src>, so tat means its not locally linking, so all the images goes blank!

Update: I have now added two common hacks for nohover and rightclick disable!!


REgards,
Zooom...!!
Logged

zoomingrocket

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Preventing Hotlinking...??
« Reply #3 on: November 29, 2004, 01:16:52 pm »

Sorry i had to do this...

BUMP!
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Preventing Hotlinking...??
« Reply #4 on: November 30, 2004, 02:34:45 am »

Have you tried this hotlink method?

http://www.mymommybiz.com/seo/preventhotlinking.html
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.