Empty URL = show news

This commit is contained in:
slawkens 2023-05-13 11:34:51 +02:00
parent 4d3ad4b6b9
commit 85769c1439
2 changed files with 2 additions and 2 deletions

View File

@ -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, '/')) {

View File

@ -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