mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 09:49:22 +02:00
Empty URL = show news
This commit is contained in:
parent
4d3ad4b6b9
commit
85769c1439
@ -29,7 +29,7 @@ require_once SYSTEM . 'functions.php';
|
|||||||
|
|
||||||
$uri = $_SERVER['REQUEST_URI'];
|
$uri = $_SERVER['REQUEST_URI'];
|
||||||
if(false !== strpos($uri, 'index.php')) {
|
if(false !== strpos($uri, 'index.php')) {
|
||||||
$uri = str_replace_first('/index.php', '', $uri);
|
$uri = str_replace_first('index.php', '', $uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(0 === strpos($uri, '/')) {
|
if(0 === strpos($uri, '/')) {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
return [
|
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'],
|
['GET', 'news/archive/{id:int}[/]', 'news/archive.php'],
|
||||||
|
|
||||||
// block access to some files
|
// block access to some files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user