diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-09-12 19:31:16 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-09-12 19:31:16 +0200 |
commit | ef7b3ecdc379dbb5459b1e82976d60a308900a30 (patch) | |
tree | bf7161f19bf2f286ee66be75e0635a6b79acab60 | |
parent | c3fcf16b194048d949a6b0291988d1b51af206aa (diff) | |
download | rpg-ef7b3ecdc379dbb5459b1e82976d60a308900a30.tar.gz rpg-ef7b3ecdc379dbb5459b1e82976d60a308900a30.tar.bz2 |
option for setting baseurl #523
darcs-hash:20050912173116-7ad00-d342f7b065591097b19966e4650192d449a6039e.gz
-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']; |