To go to a start page in a namespace, the id must be namespace:start. There are several solutions around (here or here) to redirect id=namespace: to the corresponding start page. However, I wanted a solution that even id=namespace (without trailing colon) is redirected.
This redirection, of course, must only take place when the page (namespace) isn't there.
In doku.php, find the line that reads
//send 404 for missing pages if configured
(should be around line 59). Before this line, add the folloging lines:
// if a page does not exist, but a namespace with that name and a default page, go to that page
if(!$INFO['exists'] && @file_exists(realpath(wikiFN($ID . ':' . $conf['start'], null)))) {
$ID .= ':' . $conf['start'];
$INFO = pageinfo();
}
The lines check if the current pages is non-existant, and if the configured start page for the namespace exists. If this is the case, the ID is set to this start page, and the pageinfo is regenerated.
When a name space exists, it's not able to create a page with the same name as the name space. (Shouldn't be a problem
)