mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 14:44:21 +00:00
fix 404 routing
This commit is contained in:
parent
1bb716a823
commit
950907a75e
2 changed files with 8 additions and 7 deletions
13
index.php
13
index.php
|
@ -3,7 +3,8 @@
|
|||
$route = @$_GET['route'];
|
||||
$route = rtrim($route, '/');
|
||||
|
||||
|
||||
require_once('config.php');
|
||||
require_once('lib/helper.php');
|
||||
|
||||
if($route == '')
|
||||
{
|
||||
|
@ -18,7 +19,7 @@ else if(preg_match('@^about$@', $route, $m))
|
|||
else if(preg_match('@^program.json$@', $route, $m))
|
||||
{
|
||||
if(!has('SCHEDULE'))
|
||||
return include('404.php');
|
||||
return include('pages/404.php');
|
||||
|
||||
include('pages/program-json.php');
|
||||
}
|
||||
|
@ -26,7 +27,7 @@ else if(preg_match('@^program.json$@', $route, $m))
|
|||
else if(preg_match('@^feedback$@', $route, $m))
|
||||
{
|
||||
if(!has('FEEDBACK'))
|
||||
return include('404.php');
|
||||
return include('pages/404.php');
|
||||
|
||||
include('pages/feedback.php');
|
||||
}
|
||||
|
@ -34,7 +35,7 @@ else if(preg_match('@^feedback$@', $route, $m))
|
|||
else if(preg_match('@^feedback/read$@', $route, $m))
|
||||
{
|
||||
if(!has('FEEDBACK'))
|
||||
return include('404.php');
|
||||
return include('pages/404.php');
|
||||
|
||||
include('pages/feedback-read.php');
|
||||
}
|
||||
|
@ -42,7 +43,7 @@ else if(preg_match('@^feedback/read$@', $route, $m))
|
|||
else if(preg_match('@^relive/([0-9]+)$@', $route, $m))
|
||||
{
|
||||
if(!has('OVERVIEW.RELIVE_JSON'))
|
||||
return include('404.php');
|
||||
return include('pages/404.php');
|
||||
|
||||
$_GET = array(
|
||||
'id' => $m[1],
|
||||
|
@ -53,7 +54,7 @@ else if(preg_match('@^relive/([0-9]+)$@', $route, $m))
|
|||
else if(preg_match('@^relive$@', $route, $m))
|
||||
{
|
||||
if(!has('OVERVIEW.RELIVE_JSON'))
|
||||
return include('404.php');
|
||||
return include('pages/404.php');
|
||||
|
||||
include('pages/relive.php');
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once('lib/bootstrap.php');
|
||||
|
||||
$talks = file_get_contents('http://vod.c3voc.de/relive/index.json');
|
||||
$talks = file_get_contents(get('OVERVIEW.RELIVE_JSON'));
|
||||
$talks = utf8_decode($talks);
|
||||
$talks = json_decode($talks, true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue