Home :: Blog :: Articles :: Web-Hosting :: How to Make Hotlinking protection with .htaccess file

How to Make Hotlinking protection with .htaccess file

How to Make Hotlinking protection with .htaccess file
Category: Web-Hosting
Posted:
Views: 1859
Comments: 0 [Post]
Synopsis: This is to prevent leeching, otherwise people can hot-link to your images and consume your bandwith and slow your sites.

This is to prevent leeching, otherwise people can hot-link to your images and consume your  bandwith and slow your sites.  

Options +FollowSymlinks
# Protect Hotlinking
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?domainname.com/ [nc]
RewriteRule .*.(gif|jpg|png)$ http://domainname.com/img/hotlink_f_o.png [nc]


Comments on How to Make Hotlinking protection with .htaccess file

Start the conversation by being the first to comment!

Share comments

Your Name: *
Comments: *
Please Note: HTML Markup will be automatically removed.
The ability to post urls has been disabled by the site administrator.
*
Type the characters you see in the picture:

*