diff --git a/CHANGELOG.md b/CHANGELOG.md index 2921f8a04..20032c332 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 04/xx/2017 1. [](#bugfix) + * Fix for redirects breaking [#1420](https://github.com/getgrav/grav/issues/1420) * Fix issue in direct-install with github-style dependencies [#1405](https://github.com/getgrav/grav/issues/1405) # v1.2.1 diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index c7ca2dd7a..ab8825538 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -390,9 +390,9 @@ class Pages $config = $this->grav['config']; // See if route matches one in the site configuration - $route = $config->get("site.routes.{$route}"); - if ($route) { - $page = $this->dispatch($route, $all); + $site_route = $config->get("site.routes.{$route}"); + if ($site_route) { + $page = $this->dispatch($site_route, $all); } else { // Try Regex style redirects $uri = $this->grav['uri'];