Recent Topics

1 Oct 12, 2005 08:19    

Hi,

I have several domains set up at my host. Each domain is a subdomain but will show up as individual domain in the browser. Example:

Main-Domain: www.main.com
Sub-Domain1: sub1.main.com will show as www.sub1.de
Sub-Domain2: sub2.main.com will show as www.sub2.de

The sub-domains are just simple directories under the main domain so that sub1 for example is located at /home/username/www/sub1

I want to set up b2evolution to put several blogs on my subdomains while installing the core files only once. I found the following hack:

1. I copied index.php and the content of the directories "skins" and "xmlsrv" to the domain, where the blog should appear. (i.e. /home/username/www/sub1/)

2. I changed this in index.php:


// M.H. Hack
$root_path = '/home/username/www/sub1';
$baseurl = 'http://www.sub1.de/';
 
// require_once dirname(__FILE__).'/b2evocore/_main.php';
require_once $root_path.'/b2evocore/_main.php';

Just made sure the two lines are placed before the include of _main.php.

3. I change this in blogs/conf/_config.php:


// M.H. hack
if (! isset($baseurl))
{
    $baseurl = 'http://www.main.com/b2evolution/blogs';	
}

Now I could start the Blog from www.sub1.de without problems. The only problem was, that the RSS-Feed contained the link to www.main.com instead of www.sub1.de. So I had to change the files in /xmlsrv too:

3. Change in each file:
[code]
$resolve_extra_path = false; // We don't want extra path resolution on this page

// M.H. hack
$root_path = 'c:/cvsfiles/new_rentatut/www/b2evo/blogs';
$baseurl = 'http://www.rent-a-tutor.local/blog2';
require $root_path.'/b2evocore/_blog_main.php' ;

header("Content-type: application/xml");
echo "<?xml version=\"1.0\"?".">";
[code]

That's what I have done so far. I found that the images are not displayed, so I have to copy the /img directory to the subdomain too.

I just wonder if I am on the right path. Maybe it would be appropriate to just get deeper into the config files and changes the references for the image files too?

Maybe somebody out of the core developer team can tell me, if it's worth all the trouble to get deeper into this or if I should just wait for the next release that comes with mulitple domain support?

I already did compare some blog applications and found NucleusCMS had the best solution for muliple-domain installation. They just put an absolute path for the core files, the skins and the media files into the config. So It is possible to put the blogs on different domains on the same server without any problems. I just like b2evolution better, because it has all the features already built in.

So maybe I will find a soulution that I can use b2evo for my blogs.

Regards
Marian

2 Oct 12, 2005 15:15

The next version will have support for multiple domains built in.

3 Oct 12, 2005 15:27

i already heard that, but I want to set up my blog this month ;-)

Regards
Marian

4 Oct 12, 2005 15:38

I really wanted something similar when I first started with b2evo. I wanted subdomains rather than domains, but it brings up the same problems. I think that if this was easy to do then it would have already been added into the current version. As you're finding out, It's going to be a big job to get it working. Nucleus is a good peice of software. It was in my top three choices when I moved from Movable Type. (b2evolution and Blog:CMS were the other two). In fact, a friend of mine switched from MT to Nucleus, but later he switched again to b2evolution. If Nucleus does multiple domains and it's really important to you, then you should use that. You can always migrate to b2evolution once the new version comes out (my friend can help). You might loose all of your permalinks if you do that, though. I don't know if Nucleus and b2evo build theirs the same way. You might also consider doing separate installs of b2evolution for now. I think it's possible to merge them together later.

5 Oct 12, 2005 19:12

Thanks for the reply. Personally I like b2evo best because it has all the important features already built in. I just would like to know how the new multi-domain feature will be implemented. Maybe I will have a look at the current CVS version.

I need one or two weeks anyway to get all the graphic design finished, so maybe with some luck the new version will be out until then? If not, maybe I can just live with my current hacks until the new version is out.

Marian


Form is loading...