use absolute URL in index.php when redirecting to doku.php, fixes #2706

Note that in order to get an absolute URL, the whole DokuWiki environment is loaded now in index.php.
This commit is contained in:
Phy 2019-03-11 22:34:23 -04:00
parent 93b6fcdca3
commit 7f4718dde6
1 changed files with 4 additions and 2 deletions

View File

@ -14,8 +14,10 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
if(php_sapi_name() != 'cli-server') {
header("Location: doku.php");
exit;
if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/');
require_once(DOKU_INC.'inc/init.php');
send_redirect(DOKU_URL.'doku.php');
}
# ROUTER starts below