Is it possible to do apache mod rewrite with subdomains?

So say you have a labs.domain.com as a subdomain, is it possible to get labs.domain.com to read from domain.com/index.php?page=labs ?