Just for the records, Javascript code would look like this:
setTimeout(function(){
$id = JSINFO['id'].split(':');
// only if we're in any namespace
if ($id.length > 1) {
$id = $id.slice(0, -1).join('/');
$href = '/doku.php/' + $id + '/start';
jQuery("#dokuwiki__header .logo a").attr('href', $href);
}
}, 300);
If this is still of interest, put the above code into /dokuwiki/conf/userscript.js
(create this file if it does not exist yet). Close and restart your browser to see the effect. If not, nevermind. Cheers!