LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > How to stop hot linking

Reply
 
Thread Tools Display Modes
  #1  
Old 01-25-2013, 07:05 AM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
Default How to stop hot linking

I am running 2 CPU license of Litespeed with LASPI (not running suEXEC) with vbulletin forum.

I want to stop people from hot linking our attachments, since due to vb using php to serve those attachments; it wastes a lot of our resources.

I am not quite sure how to go about it, since CPanel Hot Lijnk protection doesn't seems to work with Litespeed, though I didn't try it with Apache either, so not sure if it works with it either.

Last edited by Yogesh Sarkar; 01-25-2013 at 10:59 PM.. Reason: post completed
Reply With Quote
  #2  
Old 01-25-2013, 09:43 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,220
the post is not complete yet, can you complete it first ?
Reply With Quote
  #3  
Old 01-25-2013, 11:00 PM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
Sorry about that, have completed the post now.
Reply With Quote
  #4  
Old 01-26-2013, 01:45 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,220
I'm not familiar with CPanel Hot Link protection yet. but it can be easily to do in .htaccess. here's an example:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png|swf|flv|mp4|mp3)$
[NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?mydomain.com [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?google\. [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?bing\. [NC]
RewriteRule \.(gif|jpe?g?|png|swf|flv|mp4|mp3)$ - [F,L]
Reply With Quote
  #5  
Old 01-26-2013, 02:04 AM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
It seems to stop normal images to be embedded elsewhere, but doesn't stops the attachments to be embedded elsewhere, like this.

Reply With Quote
  #6  
Old 01-26-2013, 02:28 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,220
while attachment can be embedded elsewhere, can it be downloaded ?
Reply With Quote
  #7  
Old 01-26-2013, 02:31 AM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
It can be downloaded.

Real problem are the image attachments, which are uploaded on our forum and then reposted elsewhere. While its not a major annoyance, it causes extra resource and bandwidth usage, which I would like to avoid, without disabling attachments for guests.
Reply With Quote
  #8  
Old 01-28-2013, 11:46 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
you should try in Apache first make sure it works before switch to lsws.
Reply With Quote
  #9  
Old 01-29-2013, 01:55 AM
Yogesh Sarkar Yogesh Sarkar is offline
Member
 
Join Date: May 2009
Posts: 42
Had been scouring through vb and vb.org, looks like there is no easy solution for stopping vb attachments to be embedded elsewhere, due to the fact that it is dynamic URL.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:15 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.