Sorry for my previous answer. I misunderstand the question. Maybe you could use one app and set a value with Configure in bootstrap, and according to that value, load specifics layous, records, etc. Even can set conditions in the models class for the model and the relations and let cake do the "magic".
On 3 oct, 10:16, Gabriel <[email protected]> wrote: > Yes, it's possible. I do that in a dreamhost's account. With a single > user i have 2 domains with folders like this: > > /home/username/domain1.com (app1) > /home/username/domain2.com (app2) > /home/username/cake (CakePHP Core) > > There is no need to modify apache config o htaccess files. > > On 2 oct, 16:00, Jacob <[email protected]> wrote: > > > That is exactly what I thought of. But is this possible on a shared > > webhost, because thats where the app lives? Is there way to do it > > without changing any apache settings? Forgive my lack of knowledge > > about Apache I am not an expert user of it. > > > On 1 okt, 14:42, Bernardo Vieira <[email protected]> wrote: > > > > You can use apache's namevirtualhost directive plus server aliases to > > > point all the domains to the same web root. After that all you have to do > > > is inspect the hostname in the $SERVER super global and use that to > > > switch the app's theme (this gives you the flexibility to have domain > > > specific layouts, views and elements) or just switch the layout. A good > > > place to deal with this is the beforefilter callback. > > > > On Oct 1, 2010, at 9:26 AM, Jacob <[email protected]> wrote: > > > > > Hello all, > > > > > I am working on a website for a company, which needs five different > > > > websites. The five websites use the same database and mostly the same > > > > records. For site specific records there is a 'company' column in the > > > > table. With a parameter a function will know what records to get. > > > > > The current setup exists of one app on the webroot en 4 others in a > > > > sub directory. This was the easiest way to solve the problem, but it > > > > has a down site. As the development is in a final stage, the > > > > controllers and views are modified a lot. For every change the other > > > > four apps need to be changed also. > > > > > My question is: > > > > Is there a way to create the illusion of five different websites while > > > > it is actually one app? For example, based on the domainname used, the > > > > layout changes? (that would be the best solution I think) But is it > > > > possible en how should this be done? > > > > > Best regards, > > > > > Jacob > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers > > > > with their CakePHP related questions. > > > > > You received this message because you are subscribed to the Google > > > > Groups "CakePHP" group. > > > > To post to this group, send email to [email protected] > > > > To unsubscribe from this group, send email to > > > > [email protected] For more options, visit this > > > > group athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
