How to setup a rule for subdomain without hardcoding the full domain

In my config we have:

 'urlManager' => array(

            'urlFormat' => 'path',

            'showScriptName' => false,

            'rules' => array(

                '<controller:\w+>/<id:\d+>' => '<controller>/view',

                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',

                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',

                '' => 'admin',



As you see the admin module is hardcoded based on the full subdomain+domain.

what I would like is to setup only the subdomain without the domain.


     	'http://admin.*' => 'admin',

What do you say, how its done?