I have two sub-domains which I want to redirect to the same directory:
$HTTP["host"] =~ "sub1\.example\.com$" {
server.document-root = "/home/adam/html/sub_domain"
}
$HTTP["host"] =~ "sub2\.example\.com$" {
server.document-root = "/home/adam/html/sub_domain"
}
Naturally, I've tried:
$HTTP["host"] =~ "sub1\.example\.com$" OR $HTTP["host"] =~ "sub2\.example\.com$"{
server.document-root = "/home/adam/html/sub_domain"
}
But got:
2011-03-14 10:19:30: (configfile.c.855) source: /etc/lighttpd/lighttpd.conf
line: 199 pos: 36 parser failed somehow near here: or
This failed with OR
(upper case), or
and even c-style ||
.
Any idea how to avoid the awkward code repetition?
This question is a copy of an unanswered post I've published in the lighttpd forum.