I've built a white label website in PHP that uses templates. Each white label will have it's own set of templates and possibly a few extra folders. All the white label sites are on the same LAMP server.
What I would like to do is keep one centralised copy of the main code on the server and then have every site point to these files. Then each white label site directory will have a physical directory for it's templates and any other extra files and directories.
The idea is to completely remove the logic from the presentation and share the logic across all the white label sites. This way I can make changes to the shared logic and all the sites will update.
Also I need a similar structure in the SVN repositories. Currently each white label site has it's own repository.
What's the best way to achive this? Can I use something like mod_rewrite to forward all requests apart from templates to shared folder?
- What I need to make sure is that it's easy to set up a new white label site
- Users that checkout a white label from the SVN repro to work on it's templates don't have access to the shared code