Permanent redirect of subdomains to www. in lighttpd?
I want to redirect all subdomain paths on domainxyz.com to www.domainxyz.com except for cdn.domainxyz.com and ad.domainxyz.com. 

To clarify: I want for example abc.domainxyz.com/cat.php?id=23 redirect to www.domainxyz.com/cat.php?id=23.

How do I do this in lighttpd?
Permanent redirect of subdomains to www. in lighttpd?
===

I want to redirect all subdomain paths on domainxyz.com to www.domainxyz.com except for cdn.domainxyz.com and ad.domainxyz.com. 

To clarify: I want for example abc.domainxyz.com/cat.php?id=23 redirect to www.domainxyz.com/cat.php?id=23.

How do I do this in lighttpd?