Welcome to WebmasterWorld Guest from 126.96.36.199
Hundreds of domain names will be configured on a shared host to use the same document root directory. The PHP application files will look up a record in the database according to the domain name being requested. It's like name-based virtual hosting. Then according to that domain's configuration in our database, the right template files and data will be displayed.
Can any older, wiser developer reveal any unforeseen problems with this model?
Another thing, and maybe this should be a separate thread, but should I use a framework like CakePHP? Would such a framework play nicely with the sort of application I described above where the same code is used to generate vastly different websites? CakePHP or CodeIgniter are tempting because it sounds like they would rapidly speed up development, but maybe they have better application in another website. Also, CakePHP seems really slow. It takes like a quarter to half second just to produce a simple hello world kind of page with the default CakePHP configuration on my shared server.
Thanks for your advice,
A) All sites are text/html with little to no unique php page building magic.
B) More than one site will require specially crafted templates or unique php page building magic to render.
If your sites are strongly type A, your idea is feasible.
If your sites are more strongly type B, I would not recommend that you handle them this way.
If most of the sites start out as type A, and only a *very* few grow to type B, then you can still proceed as planned for the type A's, and just get separate accounts for the type B's as needed.
You should consider .htaccess/ModRewrite as an alternative or supplement to your strictly php based solution. You could still keep them all in one account, but sub out the specific ones without having to build a framework for handling different domains in php.
Other thoughts and suggestions are still welcome.
I think having a separate database for each site may also be a wise idea, but that is up to you and your design plans.