Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbestle committed Mar 27, 2024
1 parent 5d29f1e commit 1f21b19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions router.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

// prepend a fake host to ensure that PHP can parse the path even if it contains weird stuff;
// afterwards just take the plain path back out from the parsed result
$uri = parse_url('https://getkirby.com/' . ltrim($_SERVER['REQUEST_URI'], '/'), PHP_URL_PATH) ?? '/';
$uri = urldecode($uri);

Expand Down

0 comments on commit 1f21b19

Please sign in to comment.