Multiple Domains & Databases

Hi - I need to run multiple websites each with it's own domain name, pointing to a unique directory under one hosting account.

The main site works fine and is installed in the root directory (/). I have created a new DB and folder /site1 installed and configured c5 without issues using Now I want to push the site live I can't get the forwarding to work correctly.

Basically needs to go directly to the /site1 directory however it just ends up at and displaying the mainsite

I have tried pointing the domain to the /site1 directory from the hosting control panel but that didn't work. The site.php is configured for the correct db and the base_url and dir_rel look ok??

define('BASE_URL', '');
define('DIR_REL', '/site1');

Any ideas welcomed!

View Replies: View Best Answer
DeWebmakers replied on at Permalink Reply
Maybe you can try a .htaccess 301 redirect (Google for the correct way to do this)
programmieraffe replied on at Permalink Reply
There is an option "'REDIRECT_TO_BASE_URL" which I guess triggers the redirect to your main folder:

But if I understand the BASE_URL config parameter correct your site would have:

Although I would try it without the base_url parameter because concrete5 will auto detect this in most cases and automatically set DIR_REL and BASE_URL.
kshire267 replied on at Permalink Reply
Thanks for the responses.

Unfortunately neither worked. Investigating further this seems to be an issue with the .htaccess file. As the main site is the / directory therefore so is the .htaccess file for the main site - it's servicing all other requests which is why it keeps going back to the main. Hopefully there is a way of rewriting the htaccess to service multiple domains in the one root.
nteaviation replied on at Permalink Reply
If you have access to your apache configuration, virtual hosts may be an option. see:

Have a look at "Running several name-based web sites on a single IP address".
programmieraffe replied on at Permalink Best Answer Reply
Ah okay, if I understand correctly you have the following structure:

/ -> c5 instance 1
/site1 -> another c5?

That's not a good solution having a c5 instance inside another c5 instance. Better do the following:
and so on. And then point the domains via the hosting panel to these folders.

Otherwise (as you pointed out correctly) everything from the root will be catched by the first instance's htaccess file.
kshire267 replied on at Permalink Reply
Worked thanks. Good house keeping practice too.

Thanks for the support, much appreciated!
adamjohnson replied on at Permalink Reply
Some links you might not have seen:

Setting up a multisite environment in Concrete5:

Domain Mapper Add on:

Admittedly, slightly wavering from your OP; however, tangentially related.
adajad replied on at Permalink Reply
This is what I did.

I uncommented the following to include httpd-vhosts.conf in httpd.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

added this to end of httpd.conf

#BEGIN Concrete 5 centralization alias
Alias /concrete "D:/sites/C5_core/Concrete5 Version"
php_value include_path "../C5_core/Concrete5 Version"
#END Concrete 5 centralization alias

in httpd-vshosts.conf added this block (edited with correct paths and aliases) for each site

<VirtualHost *:80>
    DocumentRoot "D:/sites/site1"
   ServerAlias *
    ErrorLog "D:/sites/site1/logs/concrete-error.log"
    CustomLog "D:/sites/site1/logs/concrete-access.log" common

Now, for each update of C5 I download the zipped archive and unzip the concrete folder to "D:/sites/C5_core/Concrete5 Version X.X.X/" and then just change the version number in httpd.conf.

My folder structure would be as follows:


I hope this helps.

Edit to say I'm on Windows server, but it's the same in general on all systems, I believe.