\\w[-\\w]*)(?!:)/m', '$0:', implode('', $v)); else if (PageExists($f)) { $p = ReadPage($f, READPAGE_CURRENT); $v = $p['text']; } else continue; //extract entries if (!preg_match_all("/^\\s*(\\w[-\\w]*):[^\\S\n]+(\\S*)/m", $v, $match, PREG_SET_ORDER)) continue; foreach($match as $m) { //check if entry key matches goto input if ($m[1]!=$goto) continue; //resolve any variable sorincomplete pagenames in the mapping value $urlfmt = FmtPageName($m[2], $pagename); //set a wiki Group.PageName url if url does not start with 'http' if (strpos($m[2], 'http') === false) $urlfmt = ($EnablePathInfo) ? $ScriptUrl."/".$urlfmt : $ScriptUrl."?n=".$urlfmt; //do the redirect Redirect($pagename, $urlfmt); exit; } }