now every user who registers gets a subdomain and if the user wishes he must be able to map it to his own domain name i.e www.hiscompany.com… (just like wordpress.com)
i have no idea how to get this…so any king of help or pointer in the right direction is appriciated…
You’re right, it’s not only a PHP issue. However the DNS and Web servers can be configured to respond to any subdomains under the main domain, so Yii can redirect to the right place using URL management rules. It’s not trivial work but not overly complicated either.
Do you say that when we add/remove/change our users and their subdomains, we don’t need to touch anything in the DNS and the web server once they are configured properly?
… Ah, OK. I’ve found. “Wild card” in A record of DNS + mod_vhost_alias of apache … Am I right?
It’s a bit tricky to get right in both places (DNS & Apache/nginx) but once it’s set up it works fine, so one can concentrate on Yii’s URL management using host parameters.