I need to:
1- Parse the domain:
"http://exemple.com" to "exemple"
"http://sub.exemple.com" to "sub" + "exemple"
2- Compare with DB to get tenantID
3- Display the view with the correct domain "http://exemple.com/site/whatever"
Now I tried to understand URLmanager my guess would be something like this:
Now I would love to access the domain and subdomain like this, it would be awesome...
$mySubDomain = Yii::app()->params['testSub']; $mydomain = Yii::app()->params['testDomain'];
Basically, I try to route multiple domains with a DB. How can I extract the domain name and still have the right URL in the address bar?
Thank you for your time