I have simplified it even more, I don't know why I didn't think if this before, but the following solution fixes the problem with mixed case file extensions, .jpg, .JPEG or .JpeG are fully supported now:
$HTTP["host"] == "yoursite.com" {
server.document-root = "/home/user/public_html/"
url.rewrite-once = (
"(?i)(/.*\.([A-Za-z0-9]+))(.*?)$" => "$0",
"^/(.*?)(\?|$)(.*)" => "/sapphire/main.php?url=$1&$3"
)
server.error-handler-404 = "/sapphire/main.php"
}
Please note: the forum seems to screw up the spacing in the above code sample, please check the wiki page instead:
http://doc.silverstripe.com/doku.php?id=installation-on-lighttpd