router working with niceurls
This commit is contained in:
parent
3206110cf4
commit
6fbdeb2b32
@ -5,6 +5,10 @@ if (PHP_SAPI !== 'cli-server') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// warehouse files
|
// 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 = [];
|
$matches = [];
|
||||||
if (preg_match('/\/_(images|thumbs)\/([0-9a-f]{32}).*$/', $_SERVER["REQUEST_URI"], $matches)) {
|
if (preg_match('/\/_(images|thumbs)\/([0-9a-f]{32}).*$/', $_SERVER["REQUEST_URI"], $matches)) {
|
||||||
header('Content-Type: image/jpeg');
|
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)
|
// all other requests (use shimmie routing based on URL)
|
||||||
$_SERVER["PHP_SELF"] = '/index.php';
|
$_SERVER["PHP_SELF"] = '/index.php';
|
||||||
$_GET['q'] = explode("?", $_SERVER["REQUEST_URI"])[0];
|
$_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";
|
require_once "index.php";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user