From b33dbbf6a12d1d23540411806559679cd078de4d Mon Sep 17 00:00:00 2001 From: rsgrinko Date: Tue, 21 Jun 2022 20:44:27 +0300 Subject: [PATCH] routes --- .htaccess | 7 +++++++ core/bootstrap.php | 2 ++ core/routes.php | 2 ++ index.php | 1 + 4 files changed, 12 insertions(+) create mode 100644 .htaccess create mode 100644 core/routes.php diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..37ef9c6 --- /dev/null +++ b/.htaccess @@ -0,0 +1,7 @@ + +RewriteEngine on +RewriteBase / +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule (.*) /index.php?route=$1 [QSA,L] + \ No newline at end of file diff --git a/core/bootstrap.php b/core/bootstrap.php index 867986e..6a96c6e 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -38,6 +38,8 @@ } }); + require_once __DIR__ . '/routes.php'; + Cache::init(ROOT_PATH . '/core/cache/', USE_CACHE); // очистка кэша diff --git a/core/routes.php b/core/routes.php new file mode 100644 index 0000000..f0d879c --- /dev/null +++ b/core/routes.php @@ -0,0 +1,2 @@ +
'; if (User::isAuthorized()) { global $USER; echo str_replace('getAllUserData(), 'Информация о пользователе'));