From 7f4718dde656983247eeef9c47d1d4d40d874392 Mon Sep 17 00:00:00 2001 From: Phy Date: Mon, 11 Mar 2019 22:34:23 -0400 Subject: [PATCH] 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. --- index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 67c6e92be..bfb4c0b6a 100644 --- a/index.php +++ b/index.php @@ -14,8 +14,10 @@ * @author Andreas Gohr */ 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