Oops.. I guess this wasn't meant to be "syntax" :) Sort of is!
Anyway, I've had a play with all the variables available to PHP at that point during getBaseURL(). As far as I can tell, there's something wrong with 2 of the variables because they are not returning what they are suppose to. From
http://www.zend.com/lists/php-dev/200209/msg00834.html , the following variables should be available
SCRIPT_NAME=/subdir/level1/level2
SCRIPT_FILENAME=/path/to/doc/root/subdir/doku.php
SCRIPT_URL=SCRIPT_NAME
SCRIPT_URI=http://wiki.example.com/subdir/level1/level2
As you can see, the variables are pretty much useless for finding the first baseurl as needed for finding things like the style.css.
So, I cheated.
I changed the conf file to this:
$conf['userewrite'] = 1; //this makes nice URLs but you need to enable it in .htaccess first 0|1
$conf['useslash'] = 1; //use slash instead of colon? only when rewrite is on
$conf['baseurl'] = ''; // must be used it the above 2 are set to 1(true). is equal to the subdir off rootdir doku.php is in.
and change the getBaseURL() to include
if(($conf['userewrite'] == 1) && ($conf['useslash']) == 1) {
// Special case where the dirname of PHP_SELF gives the WRONG answer
$dir = $conf['baseurl'] . '/';
} else {
$dir = dirname($_SERVER['PHP_SELF']).'/';
}
It works and it doesn't break TOO many things :P