Recent Topics

1 Aug 18, 2006 17:59    

I think that the blog setting should have an option to specify the base URL for each blog separately, or at least have a place to plug in the hostname.

I currently use this code in /b2evolution-1.8/blogs/conf/_basic_config.php, it makes the baseurl equal to the hostname + /_blogs, since I have the /_blogs directory aliased to the b2e folder in apache.

$baseurl = "http";
if (@$_SERVER['HTTPS'])
        $baseurl .= "s";
$baseurl .= "://" .$_SERVER['HTTP_HOST'];
if (($_SERVER['SERVER_PORT'] != 80 && !@$_SERVER['HTTPS']) || ($_SERVER['SERVER_PORT'] != 443 && @$_SERVER['HTTPS']))
        $baseurl .= ":". $_SERVER['SERVER_PORT'];
$baseurl.= "/_blogs/";

2 Aug 18, 2006 18:01

Then I also added the whole domain to the blacklist in b2evolution-1.8/blogs/conf/_stats.php

$blackList = array(
    substr( $baseurl, 0, strlen($baseurl)-1 ),
    str_replace( "/_blogs/", "", $baseurl),
...

3 Aug 18, 2006 18:12

What's wrong with using "Absolute URL" from the blog's general Settings tab?

This is what you get from $Blog->get('url') for example..

4 Dec 07, 2006 22:06

I would like to put in a vote for this feature. This would solve my problem.

my problem can be seen here:
http://forums.b2evolution.net/viewtopic.php?p=47931

Blueyed wrote:

What's wrong with using "Absolute URL" from the blog's general Settings tab?

Because setting "Absolute URL" limits your to that one URL. This solution allows the the $baseurl to include any domain which points to the blog installation.


Form is loading...