Web Hosting, cPanel, Plesk, cPanel Help, Plesk Help, Tutorials, Articles

Web Hosting Articles, Web hosting FAQ’s, Control Panel Help & Updates.

Prevent hotlinking of images from .htaccess

November23

Preventing Images Hotlinking on a Web Site

Bandwidth theft or hotlinking is a direct linking to web site’s files (images, video, etc.). It can be prevented with the mod_rewrite module.

Place rules like below into the .htaccess files for the domain (for example www.example.com):

 RewriteEngine on
RewriteCond % !^$
RewriteCond % !^http://(www\.)?example\.com(/)?.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|swf)$ – [NC,F] 

posted under Others

Email will not be published

Website example

Your Comment: