Fix for redirects breaking #1420

This commit is contained in:
Andy Miller
2017-04-11 13:32:25 -06:00
parent 1d7f41e4a8
commit 60f97f27be
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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'];