Skip to content

Commit

Permalink
Empty URL = show news
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed May 13, 2023
1 parent 4d3ad4b commit 85769c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -29,7 +29,7 @@

$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, '/')) {
Expand Down
2 changes: 1 addition & 1 deletion system/routes.php
Expand Up @@ -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
Expand Down

0 comments on commit 85769c1

Please sign in to comment.