Hotlink protection prevents other websites from directly linking to files on your website. Other sites will still be able to link to any file type that you don't specify (i.e., HTML files). An example of hotlinking would be using an <img> tag to display an image from your site somewhere else on the Web. The end result is that the other site is stealing your bandwidth.
1: RewriteCond %{HTTP_REFERER} !^$2: RewriteCond %{HTTP_REFERER} !^http://yoursite.com/.*$ [NC]3: RewriteCond %{HTTP_REFERER} !^http://yoursite.com$ [NC]4: RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/.*$ [NC]5: RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com$ [NC]6: RewriteCond %{HTTP_REFERER} !^https://yoursite.com/.*$ [NC]7: RewriteCond %{HTTP_REFERER} !^https://yoursite.com$ [NC]8: RewriteCond %{HTTP_REFERER} !^https://www.yoursite.com/.*$ [NC]9: RewriteCond %{HTTP_REFERER} !^https://www.yoursite.com$ [NC]10: RewriteRule .*\.(jpg|jpeg|gif|png|ico|bmp|swf|wav|mp3|pdf|xls|xlsx|xps|psd|dxf|eps|ps|ai|tiff|svg|ttf|doc|docx|css|js|jsp|cfm|htm|shtml|shtm|xhtml|xhtm|jsp|phtml|phtm|php3|php4|php5|pl|pm|plx|xsml|log|json|otf|woff)$ http://www.yoursite.com/ [R,NC]
Code RewriteCond %{HTTP_REFERER} !^$ this will allow that file to be open in browser. If you disable it user only can open on your site.
For disable download (i.e., EXE, ZIP, RAR files) you need disable all domain linking it (including your domain). As example below.
1: RewriteRule .*\.(exe|rar|tar|bz|gz|bat|sh|bz2|vbs|lzm|iso|cmd|pif|com|run|deb)$ /redirect/file.html [R,NC]
0 comments:
Post a Comment
We are not responsible for comments expressed within this site. It is the account holder's personal views and all risks of comments posted his own account owner's responsibility. Comments wisely as it showed your maturity.
Click to see the code!
To insert emoticon you must added at least one space before the code.