Part 1
I want to build a PHP Zend Framework application that users can sign up to use. When they register, I would like the application to create a sub-domain that points to their public page, that serves up content specific to that client.
For example: http://mywebapp.com/username or http://username.mywebapp.com
Update: "Using sub-domains as account keys" is a good tutorial that pretty much answered my question on this one. This involves using Zend_Controller_Router_Route_Hostname
.
However, I am still wondering...
Question #1: the tutorial doesn't mention setting up a wildcard sub-domain. Is this necessary in order to achieve this? Is there any way around using a wildcard subdomain?
Part 2
I will also need to offer users the ability to register domain names and point them to their page. So if you were to go to http://clientdomain.com, you would be seeing http://clientname.mywebapp.com, but you would never be able to tell because the url in the address bar shows http://client1.com. Does that make sense? I think the process is called domain masking. I basically want to offer my users free domain masking.
Update: I've just discovered the world of domain reseller APIs. OpenSRS looks nice. Do you have one to recommend?
Question #2: How does domain masking work? Can it work with a domain reseller API?