2

I am using lighttpd web server and mod_write and have a simple host match expression:

$HTTP["host"] =~ "domain\.com$" {
}

The problem is this is matching test.domain.com as well. How do I modify the expression to only match http://domain.com but not any subdomains such as test.domain.com?

Thanks.

1 Answer 1

2
$HTTP["host"] =~ "^domain\.com$" {

The ^ character specifies that the start of the string must be at this position; it won't match if there's anything before domain.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .