Multiple sites in one database

Author Message

Maarten Holland

Thursday 17 August 2006 2:55:10 am

Hello all,

For an open-source project, I'm setting up 3 sites, all related to that project. Since a lot of content is shared amongst 2 or 3 sites, I really like to use one ezPublish with one database, to avoid having to publish content twice. This sounds logical to me, but perhaps I'm overseeing something fundamental, because based on all documentation and forum topics I've read, it looks like it is not possible to use 1 database for multiple sites?

I was thinking:
1 - Set up one ezPublish with 3 siteaccess for the frontends and 1 siteaccess for the backend. (All host-based).
2 - Create 3 folders (or 'sites' using a new content class) in the root of ezPublish.
3 - Publish content for each site in the right folder(s).

Here's the problem: I do not want to show the folder/site name from step 2 in the URL. Using Apache's rewrite rules, I've managed to remove 'index.php' from the URL. Unfortunately I don't have much knowledge of rewriting. Can anyone tell me if it's possible to use them to rewrite an URL like
http://www.domain1.com/index.php/domain1folder/article to http://www.domain1.com//article?

If I'm not mistaken, that should make it possible to run 3 sites in 1 database, shoudn't it?

Any hints, tips or links to more info is HIGHLY appreciated!

Thank you for your time,

Maarten

Paul Forsyth

Thursday 17 August 2006 3:16:29 am

Hi,

PathPrefix is what you want:

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/siteaccesssettings/pathprefix

So, setting PathPrefix to 'domain1folder' in one siteaccess will chop off that part of the url. And do the same for your other siteaccesses.

Paul

Maarten Holland

Thursday 17 August 2006 3:29:03 am

Yes! Thank you Paul! That's it! Did I mention ezPublish is <b>brilliant</b>?

Totally cool!

Any other hints and pitfalls are still very welcome though.

Thanks everyone,

Maarten

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.