Controller And Module With Same Name

I have controller and module with same name: download









So I want to links like:

to be routed to: application/controllers/DownloadController

where $_GET[‘url’]==‘dir1/dir2/’

And links like:

to be routed to: application/modules/download/controllers/DefaultController.php

where $_GET[‘code’]==‘some_code’

But now both types of links are routed to: application/modules/download/controllers/DefaultController.php

I can’t understand why

Is it real to use full absolite URL with ‘http://’ prefix in ‘rules’? I think it is not.


in order to process host in your rules, you should set CUrlRule::hasHostInfo to TRUE:


	'http://'.SITE_DOMAIN.'/<action:(download)>/<url:.*>' => array('download/<action>', 'hasHostInfo'=>true),

	'http://<module:(download)>.'.SITE_DOMAIN.'/<code:\w{32}>' => array('<module>', 'hasHostInfo'=>true),


In some caseses I have different rules for http and for https.

Nothing changed :(

I think it is not possible to use domain names in ‘rules’ of ‘urlManager’ component. I think it must be implemented via htaccess.