Skip to content

Commit 5487e98

Browse files
committed
Fix bug when routing urls containing query params
1 parent ad530ee commit 5487e98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Blog.php

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public function __invoke(): void
115115
protected function route(): array
116116
{
117117
$requestUri = $_SERVER['REQUEST_URI'] ?? '';
118+
$requestUri = parse_url($requestUri, PHP_URL_PATH);
118119
$page = null;
119120
foreach ($this->pageConfigs as $pageId => $pageConfig) {
120121
$pattern = $pageConfig['parse_pattern'];

0 commit comments

Comments
 (0)