summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-10-11 23:44:44 +0200
committeremkael <emkael@tlen.pl>2016-10-11 23:44:44 +0200
commit05c2c56067c79b606cd89f16f30bc0261fa425fb (patch)
treeb4635d4f8bc8caf1da0fb96023b8b4d7983464cd /src
parent3b9fa57f0875720c75b093e391012a90c50c954e (diff)
* subpaths supported in dynamic version of the page
Diffstat (limited to 'src')
-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';
}