![]() |
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. |
the post is not complete yet, can you complete it first ?
|
Sorry about that, have completed the post now.
|
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] |
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 |
while attachment can be embedded elsewhere, can it be downloaded ?
|
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. |
you should try in Apache first make sure it works before switch to lsws.
|
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. |