I have two websites, websitea and websiteb.
I have them both pointing to the same document root and all works fine, however I want websitea to have different db details to websiteb.
Database details are stored in /config/database.php
I could just write an if statement in that php file to tell it which database details to use depending on the hostname, however I am going to add another 10 websites like this, and that is going to get a pain very fast.
The second issue is I have a folder called /images/ which contains user uploaded pictures, these again need to be different.
When I was first thinking about it, I thought I could use apaches alias's - however thats not going to work with php, as doing
<?php include('config/database.php');?>
will not follow the alias (not a web request, it's a local dir lookup) and thus will fail.
So I am a bit stuck :)
Anyone have any thoughts?