One way to do it is use the url.redirect feature, to redirect www.sub.example.com to www.example.com/subpage
$HTTP["host"] =~ "example.com" {
$HTTP["host"] =~ "www.sub.example.com" {
url.redirect = (
"(.*)" => "http://www.example.com/subpage"
)
}
else $HTTP["host"] =~ "www.example.com" {
server.document-root = "/var/www/example.com/www/"
server.error-handler-404 = "/index.php"
}
}