1 chrpeder Aug 17, 2006 18:01
3 chrpeder Aug 18, 2006 20:13
blueyed wrote:
Have you read and applied the "Cookies" section on the manual page?
Yes I have put it as it is on the manual page.
Also, what "directories" do you mean? I've just added a "Setup your webserver" section to the manual page, to make clear that you only have a single directory, for all (sub)domains.
My dirs are as follows:
blog is installed to
public_html/blog
the subdirs are in
public_html/subdir
what files should I put in the subdirs??
4 balupton Aug 18, 2006 22:45
I have multiple domains/subdomains/locations going to my blog and i just modify my _basic_config.php file like so;
$tempurl = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
if(strstr($tempurl,'blogs.balupton.com'))
$baseurl = 'http://blogs.balupton.com/';
else if(strstr($tempurl,'localhost/DevSite'))
$baseurl = 'http://localhost/DevSite/b2evolution/blogs/';
blueyed, why couldn't this be the recomended way?
5 blueyed Aug 19, 2006 00:47
You can manually set $baseurl like you do, of course.
But IMHO the cleanest solution is to have just ServerAliases, redirect them all to the single index.php file in /blogs/ and let b2evo detect which blog gets called.
With the above "$baseurl-hack": that's for different installations, not domains.
chrpeder: you don't need any subdirs..!
6 balupton Aug 19, 2006 00:58
that's for different installations, not domains.
I cut some of it out;
$tempurl = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
if(strstr($tempurl,'localhost/')){
$db_config = array(
/* cut */
);
}else{
$db_config = array(
/* cut */
);
}
if(strstr($tempurl,'blogs.balupton.com'))
$baseurl = 'http://blogs.balupton.com/';
else if(strstr($tempurl,'localhost/DevSite'))
$baseurl = 'http://localhost/DevSite/b2evolution/blogs/';
else if(strstr($tempurl,'localhost/PubSite'))
$baseurl = 'http://localhost/PubSite/b2evolution/blogs/';
else if(strstr($tempurl,'balupton.com/blogs'))
$baseurl = 'http://balupton.com/blogs';
else if(strstr($tempurl,'balupton.nghosting.org'))
$baseurl = 'http://blogs.balupton.nghosting.org/';
else if(strstr($tempurl,'balupton.nghosting.info'))
$baseurl = 'http://blogs.balupton.nghosting.info/';
else die("You are accessing this blog from a unknown location. - goto http://blogs.balupton.com instead.");
unset($tempurl);
7 blueyed Aug 19, 2006 01:05
balupton, does it affect setting of $blog, which says what Blog gets used? It does not look so..
E.g., http://daniel.hahler.de/ is my blog, while http://joschka.hahler.de/ is the one of my brother.
8 balupton Aug 19, 2006 03:01
Ohhhh, k.
9 chrpeder Aug 19, 2006 23:21
You lost a not so technical guy like me.
Exactly what steps do I need to do in order to set up blog for
sub1.domain.com
sub2.domain.com
etc.
How do I do it via redirects/aliases? Skip the instruction in the manual and do some other stuff?
Sorry for being stupid...
10 blueyed Aug 20, 2006 02:29
chrpeder, just follow the manual, like you started with. But let the subdomains point to the exact same directory on your webspace.
Then setup the "Absolute URL" for your blogs (and use empty "stub file").
Then put the .htaccess in place.
Profit! ;)
11 chrpeder Aug 22, 2006 03:22
Thanks for your patience.
It works with the subdomains - now the subdirs are pointing to the /blog
But I still have the problem that b2evo does not rember my login. So we are back to the session cookies?
B2evo does not remember me when I change between the blogs.
Do I need to alter conf/_advanced.php in any other way than:
$cookie_domain = '.example.com';
$cookie_path = '/';
12 blueyed Aug 22, 2006 23:47
No, that should be all.
But you may have older cookies around, which override those.
Again, a link would help so I could see what session cookie I get, when I visit it..
13 chrpeder Aug 23, 2006 00:35
I got it to work on one of my domains now! I just had to delete the cookies - stupid me! Thanks a lot for the help! :D
But on one other site I cannot create a subdirs without it makes a seperate dir for it - subdir.site.com is also site.com/subdir
Here I can only set up a redirect for the subdomain in order to have it point to the /blog dir.
This does not
The site is http://habitusnetwork.org/blog
pedersen.habitusnetwork.org
Is there any way around this?
14 chrpeder Aug 23, 2006 01:02
I solved it!
I put a copy of the index.php in the subdir directory and altered lines
require_once '/usr/home/MYPATHINFO/public_html/blog/conf/_config.php';
require_once '/usr/home/MYPATHINFO/public_html/blog/inc/_main.inc.php';
This seems to work without the modrewrite also as I see it
Thanks again for the help! :D
Have you read and applied the "Cookies" section on the manual page?
Also, what "directories" do you mean? I've just added a "Setup your webserver" section to the manual page, to make clear that you only have a single directory, for all (sub)domains.