str_replace('%s', '\w{1,8}', preg_quote(BOARD_PATH, '/')) ); // Dashboard if(preg_match('/^\/?$/', $query)) { // Board index } elseif(preg_match('/^\/' . $regex['board'] . '(' . preg_quote(FILE_INDEX, '/') . ')?$/', $query)) { } else { error("Page not found."); } // The rest is not done yet... } ?>