How to Avoid Hot Linking

Posted by : Dexter Panganiban | ; Filed Under Random Post, Wordpress

You are invited to have my FREE RSS Feeds or you may Subscribe to me via emailfor latest information in this website.

“hot linking” is a problem that a site owner is facing specially if the hot link images is high views from those who copied the pics. it is also “bandwidth stealing” by others .
You may disallow hot linking by using .htaccess, It might redirect the pictures to otehr pictures in the net or just a simple broken image links.

Here are the direction on how to make it via Htaccess. You have to copy the following txt to your .htaccess. but be sure to change mydomain.com with your own

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.com/.*$ [NC]
RewriteRule .(gif|jpg|js|css)$ – [F]

The above code creates a failed request when hot linking of the specified file types occurs. In the case of images, a broken image is shown instead.

Serving alternate content when hot linking is detected

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.com/.*$ [NC]
RewriteRule .(gif|jpg)$ http://www.mydomain.com/whatever.gif [R,L]

But be sure to upload http://www.mydomain.com/whatever.gif to your server.

About the author

Dexter Panganiban : Dexter is a techie person that also blogs at his Personal Blog " Dexter Panganiban Site ", He is a Mechanical Engineer by Profession. He loves Search Engine Optimization and Making Money Online


Sign up for PayPal and start accepting credit card payments instantly.

Interesting Comments

Leave a Reply




Check my Blogging Tips and Experience

My WordPress Tips and Tricks

My SEO Tips and Tricks

Subscribe to RSS feed

Subscribe to RSS feed

Enter your email address:

Categories

Link Goodies

  • Asus Eee PC
  • blackberry software
  • sss makati philippines
  • nds downloads
  • Nokia E71
  • hp printer
  • nds roms
  • free nds rom downloads
  • Free Games for Nokia E71
  • friendster link