2009
10.27

this is a real simple way to redirect all hotlinked images to another image in apache from either the httpd.conf or an htaccess file:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?insert_url_here\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(png|gif|bmp|jpg)$ image_here.jpeg [L]

format is real simple, you just have to change insert_url_here\.com to your url so that any request coming to your server will be redirected to the image in the last line RewriteRule .*\.(png|gif|bmp|jpg)$ image_here.jpeg [L]

make sure to change image_here.jpeg to the path and image that you want to use.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Add to favorites
  • Reddit
  • StumbleUpon
  • Tumblr
  • Twitter
  • Posterous

No Comment.

Add Your Comment

Powered by WP Hashcash