fix: problem with pretty urls

This commit is contained in:
grandeljay 2023-09-21 21:27:02 +02:00
parent dda410e92f
commit 8ea68b44fb

View file

@ -152,7 +152,7 @@ class URL
$rewriteRule = $parts[1]; $rewriteRule = $parts[1];
$rewriteRule = ltrim($rewriteRule, '^'); $rewriteRule = ltrim($rewriteRule, '^');
$rewriteRule = rtrim($rewriteRule, '$'); $rewriteRule = rtrim($rewriteRule, '$');
$target = $parts[2]; $target = ltrim($parts[2], '/?');
$keys = array_map( $keys = array_map(
function ($item) { function ($item) {
return explode('=', $item)[0]; return explode('=', $item)[0];
@ -161,7 +161,7 @@ class URL
); );
$flags = explode(',', substr($parts[3], 1, -1)) ?? array(); $flags = explode(',', substr($parts[3], 1, -1)) ?? array();
parse_str(ltrim($target, '/?'), $parameters); \parse_str(\parse_url($target, PHP_URL_QUERY), $parameters);
/** */ /** */
/** Determine a potential URL. */ /** Determine a potential URL. */