It’s been a long time coming and at the end of last week I finally got around to revamping my family tree website. It used to be static pages that I hand-coded and hadn’t been updated for months. I have now converted it to a WordPress blog (just like this one), which means I can add entries there when I’m researching one branch or other of the family tree.
In addition to re-launching this site, I had to add code on all my sites this morning when I found a Russian site that had basically taken and translated every post on my blog into Russian and was presenting it complete with all my (hotlinked) images and style sheet. I have now added code in my sites’ .htaccess file preventing hotlinking of images and my stylesheets from other sites. I checked David Airey’s blog post How to stop image hotlinking and bandwidth theft before adding the code.
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://([a-z\.\-]+)?ianhedges.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://([a-z\.\-]+)?ijhedges.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://([a-z\.\-]+)?ijhedges.co.uk/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://([a-z\.\-]+)?cre8Buzz.com/.*$ [NC] RewriteRule .(gif|jpg|png|css)$ - [F]
I’ve allowed cre8Buzz, as I hotlink my profile images from my gallery.
Warning: Declaration of Social_Walker_Comment::start_lvl(&$output, $depth, $args) should be compatible with Walker_Comment::start_lvl(&$output, $depth = 0, $args = Array) in /homepages/9/d69875426/htdocs/ianblog_wp/wp-content/plugins/social/lib/social/walker/comment.php on line 18
Warning: Declaration of Social_Walker_Comment::end_lvl(&$output, $depth, $args) should be compatible with Walker_Comment::end_lvl(&$output, $depth = 0, $args = Array) in /homepages/9/d69875426/htdocs/ianblog_wp/wp-content/plugins/social/lib/social/walker/comment.php on line 42
Hi Ian,
You might want to also allow Google.com in your htaccess code. This will keep images showing in both Google Reader and any Google image searches that show your files.
All the best, buddy.
Thanks David,
I hadn’t thought of Google. After checking my 403 logs, I found I also needed to add feedburner.com. It is amazing to see where my images are used. I think I should have acted when I originally read your article.
Regards,
Ian
[…] on Mon 08-12-2008 What Is Hotlinking And Why Is It Bad? Saved by wfryer on Thu 04-12-2008 Revamping a website and preventing hot-linking Saved by elgucu on Mon 01-12-2008 Prevent Image Hotlinking with .htaccess Saved by msheeh2 on Thu […]