$currentDir = dirname($_SERVER['SCRIPT_NAME']);
if ($currentDir != '/') {
- $requestUrl = str_replace($currentDir, '', $requestUrl);
- }
+ $requestUrl = str_replace($currentDir, '', $requestUrl);
+ }
// check if request _url matches route regex. if not, return false.
- if (! preg_match("@^" . $this->basePath . $routes->getRegex() . "*$@i", $requestUrl, $matches)) {
+ if (!preg_match("@^" . $this->basePath . $routes->getRegex() . "*$@i", $requestUrl, $matches)) {
continue;
}
+ $matchedText = array_shift($matches);
$params = array();