summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.php b/src/index.php
index 9fb3b24..41ca889 100644
--- a/src/index.php
+++ b/src/index.php
@@ -15,7 +15,7 @@ $content = new MySmarty();
$content->assign('lang', Env::lang());
try {
$url = ($_SERVER['QUERY_STRING']) ? substr($_SERVER['REQUEST_URI'], 0, -strlen($_SERVER['QUERY_STRING'])) : $_SERVER['REQUEST_URI'];
- $pageID = explode('/', preg_replace('/\?$/', '', $url))[1];
+ $pageID = trim(preg_replace('/\?$/', '', $url), '/');
if (!strlen($pageID)) {
$pageID = 'main';
}