From: Harvie Date: Tue, 30 Nov 2010 08:00:27 +0000 (+0100) Subject: Base36 fascism - will redirect every GET request to /k/ X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=692f2b82d392299490c167c956c7bf69bf254eb7;p=mirrors%2FKyberia-bloodline.git Base36 fascism - will redirect every GET request to /k/ --- 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];