Subdomains and modules

Hi!

I have some domains on my site, and want to redirect each domain on it’s own module. First solution was to create for each domain own index.php with own configurations. But i decide to create rules for urlmanager, and i have such problem.




//example rule

'rules'=>array(

   'http://admin.example.com/<controller:\w+>/<action:\w+>'=>'admin/<controller>/<action>'

),



And all ok with creating rules. All rules for admin module create like http://admin.example.com/site/index. But when i try go to that link, i recieve error 404, so i understand that he doesn’t parse it. May be someone have such problems?

Thanks.