From 85769c14397483d77be86e5d3a6590bff92ae265 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 13 May 2023 11:34:51 +0200 Subject: [PATCH] Empty URL = show news --- index.php | 2 +- system/routes.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index e15abb21..5f27f925 100644 --- a/index.php +++ b/index.php @@ -29,7 +29,7 @@ require_once SYSTEM . 'functions.php'; $uri = $_SERVER['REQUEST_URI']; if(false !== strpos($uri, 'index.php')) { - $uri = str_replace_first('/index.php', '', $uri); + $uri = str_replace_first('index.php', '', $uri); } if(0 === strpos($uri, '/')) { diff --git a/system/routes.php b/system/routes.php index d0f5f64d..5d93bd1b 100644 --- a/system/routes.php +++ b/system/routes.php @@ -10,7 +10,7 @@ defined('MYAAC') or die('Direct access not allowed!'); return [ - ['GET', '', '__redirect__/' . (config('friendly_urls') ? '' : 'index.php/') . 'news'], // redirect empty URL to news + ['GET', '', 'news.php'], // empty URL = show news ['GET', 'news/archive/{id:int}[/]', 'news/archive.php'], // block access to some files