Permalink
Browse files

Reverted commit - 'Fixed resolving url'.

  • Loading branch information...
piotrooo committed Dec 20, 2018
1 parent 9f645b8 commit ff4c18f4b679812a9b148b3f2790cd7c9162596c
Showing with 4 additions and 5 deletions.
  1. +1 −1 src/Ouzo/Core/Uri.php
  2. +3 −4 src/Ouzo/Core/Uri/PathProvider.php
@@ -74,7 +74,7 @@ public function getPathWithoutPrefix()
if (preg_match('#.+/$#', $path)) {
$path = rtrim($path, '/');
}
return $path ?: '/';
return $path;
}
public function getParam($param)
@@ -11,11 +11,10 @@ class PathProvider implements PathProviderInterface
{
public function getPath()
{
$url = Arrays::getValue($_SERVER, 'REQUEST_URI');
if ($url) {
return $url;
$uri = Arrays::getValue($_SERVER, 'REDIRECT_URL');
if (!$uri) {
return Arrays::getValue($_SERVER, 'REQUEST_URI', '/');
}
$uri = Arrays::getValue($_SERVER, 'REDIRECT_URL', '/');
$queryString = Arrays::getValue($_SERVER, 'REDIRECT_QUERY_STRING');
return $queryString ? $uri . '?' . $queryString : $uri;
}

0 comments on commit ff4c18f

Please sign in to comment.