See
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/configuration_files/site_ini/siteaccesssettings/matchorder http://ez.no/doc/ez_publish/technical_manual/3_8/reference/configuration_files/site_ini/siteaccesssettings/hostmatchtype
I think you are talking about url redirection, and that can be made with mod_rewrite in apache. You can find more info at: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
also, as Kristof said, you can use HostMatchType rule like this
This regexp setup uses the regular expression ^(.+)\.example\.com to match anything in front of .example.com. The first match is set up to hold the siteaccess. E.g the hostname test.example.com yields the siteaccess test.