From 692f2b82d392299490c167c956c7bf69bf254eb7 Mon Sep 17 00:00:00 2001 From: Harvie Date: Tue, 30 Nov 2010 09:00:27 +0100 Subject: [PATCH] Base36 fascism - will redirect every GET request to /k/ --- wwwroot/nodes.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wwwroot/nodes.php b/wwwroot/nodes.php index 9022178..2070296 100644 --- a/wwwroot/nodes.php +++ b/wwwroot/nodes.php @@ -49,6 +49,15 @@ if($PATH_INFO != '') { case 'id': if(isset($PATH_CHUNKS[2]) && $PATH_CHUNKS[2] != '') $_GET['node_id'] = $PATH_CHUNKS[2]; if(isset($PATH_CHUNKS[3]) && $PATH_CHUNKS[3] != '') $_GET['template_id'] = $PATH_CHUNKS[3]; + + //Base36 fascism redirect + if(!count($_POST)) { + header('Location: /k/'.base_convert($_GET['node_id'], 10, 36). + (isset($_GET['template_id'])?'/'.base_convert($_GET['template_id'], 10, 36):'') + ); + die("Base36 fascism...\n"); //If you want to be a fascist you have to die imediatelly... + } + break; default: if($PATH_CHUNKS[1] != '') $_GET['node_name'] = $PATH_CHUNKS[1]; -- 2.30.2