Hi Ken,
You can match that hostname with `== "clicksafety.co.uk"' in Lighttpd.
Regarding your problem: that is strange, when you make Lighttpd redirect
it does not do anything with web.py at all, it does not even know if the
URL is legal. I do the same for all my domains, but the other way
around: no www. Here is an excerpt from my config file:
# BEGIN NOPHILOSOPHY
} else $HTTP["host"] == "www.nophilosophy.com" {
url.redirect = ("^/(.*)$" => "http://nophilosophy.com/$1" )
} else $HTTP["host"] == "nophilosophy.com" {
server.document-root = "/a/boao/home/emilia/nophilosophy.com/static"
fastcgi.server = ( "/" =>
(( "bin-path" => "/a/boao/home/emilia/nophilosophy.com/code.py",
"socket" => "/tmp/fastcgi-py-nophilosophy.com.socket",
"check-local" => "disable",
"bin-environment" => ("REAL_SCRIPT_NAME" => "")
))
)
# Disable fcgi for resources with an extension (except /sitemap.xml).
$HTTP["url"] =~ "^.+\..{3,4}$" {
$HTTP["url"] != "/sitemap.xml" {
expire.url = ("" => "access 1 days")
fastcgi.server = ()
}
}
# END NOPHILOSOPHY
That part takes care of the nophilosophy.com domain, www. and non-www.
Hope it helps!
Greetings,
Hraban