From 6fbdeb2b32ff9493939e4d3c2022f52d6c0597ea Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 18 Mar 2020 20:27:14 +0000 Subject: [PATCH] router working with niceurls --- tests/router.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/router.php b/tests/router.php index dc35c942..c35a69c0 100644 --- a/tests/router.php +++ b/tests/router.php @@ -5,6 +5,10 @@ if (PHP_SAPI !== 'cli-server') { } // warehouse files +@include_once "data/config/shimmie.conf.php"; +require_once "core/sys_config.php"; +require_once "core/polyfills.php"; +require_once "core/util.php"; $matches = []; if (preg_match('/\/_(images|thumbs)\/([0-9a-f]{32}).*$/', $_SERVER["REQUEST_URI"], $matches)) { header('Content-Type: image/jpeg'); @@ -21,5 +25,5 @@ if (preg_match('/\.(?:png|jpg|jpeg|gif|css|js|php)(\?.*)?$/', $_SERVER["REQUEST_ // all other requests (use shimmie routing based on URL) $_SERVER["PHP_SELF"] = '/index.php'; $_GET['q'] = explode("?", $_SERVER["REQUEST_URI"])[0]; -error_log($_GET['q']); +error_log($_GET['q']); // if we use a custom handler, we need to do our own access log require_once "index.php";