Redirecting... Lighttpd!
So now, thanks to the following bit of configuration code, everything seems to be working really well. I post this so that future generations may learn from my mistakes. Or I'm just following the Linus creed: "Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it." :)
## Redirect to www.kangaroobox.com for SEO
$HTTP["host"] !~ "^www.kangaroobox.com" {
url.redirect = (
"^/(.*)" => "http://www.kangaroobox.com/$1"
)
}
## Rewrite the URL for sapphire
$HTTP["host"] =~ "^www.kangaroobox.com" {
url.rewrite-once = (
"(?i)(/.*\.([A-Za-z0-9]+))(.*?)$" => "$0",
"^/(.*?)(\?|$)(.*)" => "/sapphire/main.php?url=$1&$3"
)
server.error-handler-404 = "/sapphire/main.php"
}