LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Install/Configuration (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=11)
-   -   How to stop hot linking (http://www.litespeedtech.com/support/forum/showthread.php?t=6590)

Yogesh Sarkar 01-25-2013 07:05 AM

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.

NiteWave 01-25-2013 09:43 PM

the post is not complete yet, can you complete it first ?

Yogesh Sarkar 01-25-2013 11:00 PM

Sorry about that, have completed the post now.

NiteWave 01-26-2013 01:45 AM

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]

Yogesh Sarkar 01-26-2013 02:04 AM

It seems to stop normal images to be embedded elsewhere, but doesn't stops the attachments to be embedded elsewhere, like this.

http://www.bcmtouring.com/forum/atta...951d1355983815

NiteWave 01-26-2013 02:28 AM

while attachment can be embedded elsewhere, can it be downloaded ?

Yogesh Sarkar 01-26-2013 02:31 AM

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.

webizen 01-28-2013 11:46 AM

you should try in Apache first make sure it works before switch to lsws.

Yogesh Sarkar 01-29-2013 01:55 AM

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.


All times are GMT -7. The time now is 12:48 AM.