diff options
-rw-r--r-- | conf/dokuwiki.php | 1 | ||||
-rw-r--r-- | inc/init.php | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 6b8aee896..b7850d760 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -13,6 +13,7 @@ $conf['umask'] = 0111; //set the umask for new files $conf['dmask'] = 0000; //directory mask accordingly $conf['lang'] = 'en'; //your language $conf['basedir'] = ''; //absolute dir from serveroot - blank for autodetection +$conf['baseurl'] = ''; //URL to server including protocol - blank for autodetect $conf['savedir'] = './data'; //where to store all the files /* Display Options */ diff --git a/inc/init.php b/inc/init.php index 092d023c3..4b01a1240 100644 --- a/inc/init.php +++ b/inc/init.php @@ -176,6 +176,9 @@ function getBaseURL($abs=false){ //finish here for relative URLs if(!$abs) return $dir; + //use config option if available + if($conf['baseurl']) return $conf['baseurl'].$dir; + //split hostheader into host and port list($host,$port) = explode(':',$_SERVER['HTTP_HOST']); if(!$port) $port = $_SERVER['SERVER_PORT']; |