I have a php backend which is to be used by multiple sites on a server I control. Now rather than having an individual copy in each web root, what is the best method to have each site work from 1 shared backend? (For easy updating of the backend, etc)
A:
The site and backend are connected through the database. It doesn't matter where the backend and all your sites are located, as long as they all connect to the same database, they share the same information.
Alec
2010-10-22 21:40:38
A:
keep one copy of the core files that are common across all the sites. have all the sites link up to the core files. the non-core files can reside in its own sites folder. \
deepsat
2010-10-22 21:55:51
Where do I keep the core shared files. I'm trying this at the moment using htaccess to point the sites to the core files but it won't point behind the web root of the htaccess. /core.php = core files /site1 = site. Rewrite ^/$ ../core.php [L] .... this gives me a 400 bad request error. Any suggestions? I want to use htaccess so I don't need to setup loads of sym links for each site.
DRKM
2010-10-23 15:23:06
you cannot use the rewrite to access files behind web root. you will need to use links from below the web root. i dont think you can avoid the use of sym links. otherwise you will have to use direct copies, which i presume is what you wanted to avoid.
deepsat
2010-10-23 21:47:43