Mikedowney.co.uk
What's New
Site Map

Diary
Astronomy
Bits N Bobs
Computing
Food And Drink
Links
Photography
Welcome


Recipe Collections
Recipe A Week 2013
Recipe A Week 2010
A-Z of Regional Cakes
Alphabet of Nations


Selected Entries
Pinhole Photography
Keeping Quail
Coventry
Recipes
A different recipe each week
Friends websites
Oven Temperatures and Measuring Cups


Most popular stories
A Hamster's Home is his C...
Hamster Peanuts
Simple HDR photography wi...
A Tangfastic Mess
Halloween Animal Beds
Hamster Baby Update
Decaffeinated Coffee
Garden Fountain
Pizza, Hamsters and Ballo...
More Squirrel Photos
Not Quite HDR photography


RSS Feeds:
RSS Feed Entire Site.
RSS Feed Diary only.



Powered by Blosxom


Pinhole Photography Ring
pinhole webring logo
powered by RingSurf
Next | Previous
Random Site | List Sites

Growing Up

Story location: Home / Blog / Hamsters /
13/Apr/2008

Orna's babies are proper tiny hamsters now, rather than the pink blobs in the original photograph.

We had to be very careful taking the early photos. You shouldn't disturb the nest or touch the babies because if the mother detects a 'foreign' scent, she might believe the babies are under threat from a predator, and she's likely to eat them. We have heard stories of this happening to other hamsters, and we didn't want it to happen to ours.

At about day 11, their eyes started to open and they became more active - although some had escaped from the nest and been exploring before then. Now (day 13), they are very active and leave the nest quite often.

The final photo also has a picture of one of the 3 quail chicks which have hatched so far this weekend.

 

Thumbnail Thumbnail Thumbnail Thumbnail Thumbnail
Thumbnail Thumbnail Thumbnail Thumbnail Thumbnail
Thumbnail Thumbnail

Click on the thumbnail to view the image



Trying to prevent image theft 1: Using .htaccess

Story location: Home / computing /
13/Apr/2008

I've had a problem recently with people stealing images from my website - either hot-linking them or re-uploading them to other sites. My first attempt to stop this was by modifying the .htaccess file on the web server, telling it to only allow image requests from recognised places.

This works because most browsers send a 'referrer' value which tells the web server where the request came from. If I display an image on my site, the referrer should be 'mikedowney.co.uk', which would be allowed. Requests from other sites would be disallowed.

This should work with most sites hosted on an Apache server. I added the following lines to the .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mikedowney.co.uk [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.(\.)? [NC]
RewriteRule \.(jpg|jpeg|gif)$ /image_error.png [NC,R,L]

The first line tells the server we are using the RewriteEngine to change how some URLs are handled. The next 3 lines specify which referrers are allowed to link to images. We have:

  1. Empty referrer. This is because some browsers may not correctly fill in the 'referrer' line when requesting images.
  2. This website - it would be pointless to disallow me from showing my own images.
  3. Any of the google servers - so that the google image search will work properly. The (.)? bit at the end should match different countries, such as google.com or .co.uk etc.

The final line gives the file types this applies to and the file to display if it matches. In this case, an image with an error message.