• View our reviews on Hot Scripts
  • JS Tutorial

Recent Comments

Powered by Disqus

Back to articles

Prevent hotlinking using mod rewrite

Save your bandwidth and protect your content with simple mod rewrite rules. Just create .htaccess file in your website root directory and add code below, edited to match your needs:

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
#your domain name
RewriteCond %{HTTP_REFERER} !
#all file types you want to protect
#and file or path like nosteal.jpg 
#to which you want to redirect 
#all hot linkers and bandwidth steelers
RewriteRule .(gif|jpg|jpeg|png)$ nosteal.jpg [L]

You may also be interested in:

Powered by

blog comments powered by Disqus