heamon
(Heamon Guo)
1
Hey there,
Does anybody know that, different domain point to different module.
Like:
A project
B module
C module
d module
when I visit b.xxx.com it will show the B module content, but the url sill b.xxx.com, the same as c and d
Thx for any reply!
swafsarl
(Info)
2
look here
http://www.yiiframework.com/doc/guide/1.1/en/topics.url#parameterizing-hostnames
use parametrised hostname to parse the "subdomain", knosing that u must configure ur server so all suddomains points to the same app root folder.
than, u can use the variable "usrename" to load the correct module…
heamon
(Heamon Guo)
3
It’s not work, when I do thins like that, www.xxx.com also read the b module
what I want is when type www.xxx.com it read my default controller, when type b.xxx.com read b module
any other helps?
gusnips
(Gustavo)
4
It should work like he said
In the rules do something like:
return array(
'http://<module:\w+>.example.com/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
);