Hotlinking protection using .htaccess

This Tutorial Has Been Viewed 1,181 Times.

Protect your website bandwidth from other websites that tries to hotlink your images.
Very simply you can prevent this using a .htaccess file in your images directory and add the following code
This is really a simple approach


RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yoursitename\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ nohotlink.jpg [L]

simple :)

VN:F [1.9.13_1145]
Rating: 3.0/10 (1 vote cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Hotlinking protection using .htaccess, 3.0 out of 10 based on 1 rating

Incoming search terms:

Leave a Reply

Spam protection by WP Captcha-Free

Proudly designed by Mistonline.in.
Affordable Seo PackagesSeo BlogEdu Backlinks
More in htaccess (4 of 9 articles)


Here i am gonna quickly explain you the difference between ScriptAlias and Alias example: ScriptAlias /cgi-bin / www/cgi-bin/ A request ...