From
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333574
When PHP in a CGI or FastCGI setup is used to run Dokuwiki, Dokuwiki
thinks that the base URI is the base URI of the PHP interpreter: The
first page is shown, but all the inline images, CSS, and relative
links are wrong. Using REQUEST_URI before or instead of SCRIPT_NAME in
inc/init.php fixes things.
Patch:
--- inc/init.php.orig 2005-10-11 15:17:37.000000000 +0200
+++ inc/init.php 2005-10-11 15:17:43.000000000 +0200
@@ -157,6 +157,8 @@
if($conf['basedir']){
$dir = $conf['basedir'].'/';
+ }elseif($_SERVER['REQUEST_URI']){
+ $dir = dirname($_SERVER['REQUEST_URI']).'/';
}elseif($_SERVER['SCRIPT_NAME']){
$dir = dirname($_SERVER['SCRIPT_NAME']).'/';
}elseif($_SERVER['DOCUMENT_ROOT'] && $_SERVER['SCRIPT_FILENAME']){