diff --git a/.gitignore b/.gitignore index a1f73b42..bd4e244f 100644 --- a/.gitignore +++ b/.gitignore @@ -41,7 +41,7 @@ system/cache/* # php sessions system/php_sessions/* -!system/php_sessions//index.html +!system/php_sessions/index.html # logs system/logs/* diff --git a/index.php b/index.php index 9bcbf6e7..8b2fb8d9 100644 --- a/index.php +++ b/index.php @@ -346,12 +346,10 @@ if($load_it) )) . $content; } } else { - $file = TEMPLATES . $template_name . '/pages/' . $page . '.php'; - if(!@file_exists($file) || preg_match('/[^A-z0-9_\-]/', $page)) - { - $file = SYSTEM . 'pages/' . $page . '.php'; - if(!@file_exists($file) || preg_match('/[^A-z0-9_\-]/', $page)) - { + $file = TEMPLATES . "$template_name/pages/$page.php"; + if(!@file_exists($file) || preg_match('/[^A-z0-9_\-]/', $page)) { + $file = SYSTEM . "pages/$page.php"; + if(!@file_exists($file) || preg_match('/[^A-z0-9_\-]/', $page)) { $page = '404'; $file = SYSTEM . 'pages/404.php'; } diff --git a/nginx-sample.conf b/nginx-sample.conf index 2ae14251..a54f87e5 100644 --- a/nginx-sample.conf +++ b/nginx-sample.conf @@ -32,6 +32,6 @@ server { include snippets/fastcgi-php.conf; fastcgi_read_timeout 240; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; - # for ubuntu 22.04+ it will be php8.1-fpm.-sock + # for ubuntu 22.04+ it will be php8.1-fpm.sock } }