2 sites on one url
Permalink
Hi everyone,
I have a client for who I am designing & developing 2 sites, BUT the root of the second site has to be within a folder on the first site.
Eghttp://www.mainsite.com
www.www.mainsite.com/secondsiterootfolder/...
The reasons for this predate my involvement and this is the way it has to be for historical reasons.
From a C5 development point my gut instinct is to have 2 separate databases - therefore treating each site as an individual entity (they are for the same company, but each serves different clients & therefore have a similar layout, but differing logos, text, graphics, background images etc. This just feels the simplest and the most sensible way to do it. Thia way each site can be maintained by different people if necessary and if one site gets messed up, the other site will not be affected.
However, the sites will share some small amounts of text like phone numbers, etc.
I was just wondering what general opinion was on having 2 separate databases, or if there is a good argument for only using 1 database.
thanks
Bek
I have a client for who I am designing & developing 2 sites, BUT the root of the second site has to be within a folder on the first site.
Eghttp://www.mainsite.com
www.www.mainsite.com/secondsiterootfolder/...
The reasons for this predate my involvement and this is the way it has to be for historical reasons.
From a C5 development point my gut instinct is to have 2 separate databases - therefore treating each site as an individual entity (they are for the same company, but each serves different clients & therefore have a similar layout, but differing logos, text, graphics, background images etc. This just feels the simplest and the most sensible way to do it. Thia way each site can be maintained by different people if necessary and if one site gets messed up, the other site will not be affected.
However, the sites will share some small amounts of text like phone numbers, etc.
I was just wondering what general opinion was on having 2 separate databases, or if there is a good argument for only using 1 database.
thanks
Bek
Thanks for your reply & the link to the add-on. It sounds exactly what I could be looking for.
I do like the idea of 1 installation for all the reasons you mentioned and it just seems tidier from a development aspect, but having just spoken with my client there is a good chance each site will have different administrators. Bearing that in mind I'm leaning more towards 2 separate installations now to avoid any permissions and 'who did this to my site' headaches.
I do like the idea of 1 installation for all the reasons you mentioned and it just seems tidier from a development aspect, but having just spoken with my client there is a good chance each site will have different administrators. Bearing that in mind I'm leaning more towards 2 separate installations now to avoid any permissions and 'who did this to my site' headaches.
Does it really have to be that physical folder relationship, or is that just how it should appear to those browsing the sites?
I would go for 2 separate databases and filesets, so effectively 2 separate installs sharing a single filespace, for exactly the reasons you have described. You may have to play some .htaccess tricks, but after that it should be straight forward to set up.
If you are not tied to an actual physical folder relationship, I would put the 2 sites in side-by-side folders, and use .htaccess and domain name pointers to translate that to how visitors see it.
Whilst it would be possible to have just one real site split into 2 parts and some administration would be easier, other administration including administration permissions and linking would be unnecessarily complicated.
For shared content between 2 separate sites, one site would have the master content and the other pull content from it.
You could easily do this with the free Box Grabber addon, or for more sophisticated content pulling/filtering and caching, you could use my Universal Content Puller addon (UCP does lots of other useful stuff as well).
I would go for 2 separate databases and filesets, so effectively 2 separate installs sharing a single filespace, for exactly the reasons you have described. You may have to play some .htaccess tricks, but after that it should be straight forward to set up.
If you are not tied to an actual physical folder relationship, I would put the 2 sites in side-by-side folders, and use .htaccess and domain name pointers to translate that to how visitors see it.
Whilst it would be possible to have just one real site split into 2 parts and some administration would be easier, other administration including administration permissions and linking would be unnecessarily complicated.
For shared content between 2 separate sites, one site would have the master content and the other pull content from it.
You could easily do this with the free Box Grabber addon, or for more sophisticated content pulling/filtering and caching, you could use my Universal Content Puller addon (UCP does lots of other useful stuff as well).
Hi,
Thanks for your reply.
The reason it has to be that folder relationship is that prior to hiring me my client set up the sub folder for the new spin-off site and printed all the promotional literature accordingly. They now want to keep it that way.
I think that I'm going to go with my gut instinct which is 2 separate databases especially as my client has just informed me that there is a good chance there will be a different admin. for each site.
Thanks for your reply.
The reason it has to be that folder relationship is that prior to hiring me my client set up the sub folder for the new spin-off site and printed all the promotional literature accordingly. They now want to keep it that way.
I think that I'm going to go with my gut instinct which is 2 separate databases especially as my client has just informed me that there is a good chance there will be a different admin. for each site.
Glad I could help.
Before getting in too deep, as you have confirmed the folder relationship is purely how visitors see the site, you should do some experiments with .htaccess to test having completely separate folder structures for each site and only linking them together for those browsing.
eg:
/root/
/root/mainsite/
/root/secondsite/
Then map (in .htaccess)
/root/secondsite/
from
/root/mainsite/secondsiterootfolder/
That keeps the customers marketing blurb right, but also keeps both your c5 installations well separated and makes upgrading and replacing one or other site much easier. See
http://www.concrete5.org/documentation/how-tos/developers/organise-...
There are probably some .htaccess experts on these forums who can give you a good set of rules to do that.
Before getting in too deep, as you have confirmed the folder relationship is purely how visitors see the site, you should do some experiments with .htaccess to test having completely separate folder structures for each site and only linking them together for those browsing.
eg:
/root/
/root/mainsite/
/root/secondsite/
Then map (in .htaccess)
/root/secondsite/
from
/root/mainsite/secondsiterootfolder/
That keeps the customers marketing blurb right, but also keeps both your c5 installations well separated and makes upgrading and replacing one or other site much easier. See
http://www.concrete5.org/documentation/how-tos/developers/organise-...
There are probably some .htaccess experts on these forums who can give you a good set of rules to do that.
Thanks, I'll look into this. What I'm doing for this client is a bit similar to my development set up - I have a C5 folder with up to 5 sites in progress and 5 databases for each of those. I've never had a problem using this method, but I'm going to look the links you sent just in case I'm missing something.
kind regards
Bek
kind regards
Bek
Here's something to think about to simplify the separation.
http://www.concrete5.org/marketplace/addons/multi-theme/...