diff --git a/php/includes/Router.php b/php/includes/Router.php index e9be5e2..1e32473 100644 --- a/php/includes/Router.php +++ b/php/includes/Router.php @@ -66,8 +66,12 @@ class Router // loop trough parameter names, store matching value in $params array foreach ($argument_keys as $key => $name) { - if (isset($matches[$key + 1])) + if (isset($matches[$key + 1])) { + if($matches[$key + 1] == '*' || $matches[$key + 1] == '**') { + $matches[$key + 1] = str_replace('*', '.', $matches[$key + 1]); + } $params[$name] = $matches[$key + 1]; + } } } @@ -98,8 +102,12 @@ class Router // loop trough parameter names, store matching value in $params array foreach ($param_keys as $i => $key) { - if (isset($params[$key])) + if (isset($params[$key])) { + if($params[$key] == '.' || $params[$key] == '..') { + $params[$key] = str_replace('.', '*', $params[$key]); + } $url = preg_replace("/:(\w+)/", $params[$key], $url, 1); + } } }