Index: functions.php =================================================================== --- functions.php (revision 10426) +++ functions.php (working copy) @@ -2336,6 +2336,18 @@ // Relative uri $pathinfo = pathinfo($url); + if (!$disable_cd_check && !file_exists($pathinfo['dirname'])) + { + $url = str_replace('../', '', $url); + $pathinfo = pathinfo($url); + + if (!file_exists($pathinfo['dirname'])) + { + // fallback to "last known user page" + $url = generate_board_url() . '/' . $user->page['page']; + } + } + // Is the uri pointing to the current directory? if ($pathinfo['dirname'] == '.') {