Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
litespeed_wiki:cpanel:enable_hotlink_protection [2018/09/19 18:08]
Jackson Zhang
litespeed_wiki:cpanel:enable_hotlink_protection [2018/09/19 20:51]
Lisa Clarke Proofreading
Line 1: Line 1:
-====== ​How to enable hotlink protection ​in .htaccess for LSWS======  +====== ​Enable Hotlink Protection ​in .htaccess for LSWS ======  
-A hotlink occurs when someone embeds content from your site in another site and uses your bandwidth to serve the files. ​+A hotlink occurs when someone embeds content from your site into another site and uses //your bandwidth// to serve the files. ​
  
-On cPanel, there is a [[https://​documentation.cpanel.net/​display/​74Docs/​Hotlink+Protection|hotlink protection feature]] you can enable for apache, ​**"​cPanel >> ​Home >> Security ​>> Hotlink Protection"** and enable/disable ​hotlink protectionbut this may not work for LSWSHow to enable hotlink protection on LSWS? You can add the following rewrite rules to .htaccess of related ​domainsto replace ​"YOURDOMAIN" ​with your own domain:+On cPanel, there is a [[https://​documentation.cpanel.net/​display/​74Docs/​Hotlink+Protection|hotlink protection feature]] you can enable for Apache. Navigate to **Home > Security > Hotlink Protection** and enable ​or disable ​it 
 + 
 +This may not work for LiteSpeed Web ServerTo enable hotlink protection on LSWS, you can add the following rewrite rules to the ''​.htaccess'' ​of the relevant ​domains. be sure to replace ​''​YOURDOMAIN'' ​with your own domain:
  
   RewriteEngine on   RewriteEngine on
Line 8: Line 10:
   RewriteCond %{HTTP_REFERER} !^http(s)?://​(www\.)?​YOURDOMAIN.com/​.*$ [NC]   RewriteCond %{HTTP_REFERER} !^http(s)?://​(www\.)?​YOURDOMAIN.com/​.*$ [NC]
   RewriteRule \.(jpg|jpeg|gif|png|bmp)$ - [F]   RewriteRule \.(jpg|jpeg|gif|png|bmp)$ - [F]
- 
- 
- 
  
  
  • Admin
  • Last modified: 2018/09/19 20:51
  • by Lisa Clarke