mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 18:06:57 +02:00
Fixed incorrect routing with setup.php based base [#1892]
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
* Handle `errors.display` system property better in admin plugin [admin#1452](https://github.com/getgrav/grav-plugin-admin/issues/1452)
|
||||
* Fix classes on non-http based protocol links [#2034](https://github.com/getgrav/grav/issues/2034)
|
||||
* Fixed crash on IIS (Windows) with open_basedir in effect [#2053](https://github.com/getgrav/grav/issues/2053)
|
||||
* Fixed incorrect routing with setup.php based base [#1892](https://github.com/getgrav/grav/issues/1892)
|
||||
|
||||
# v1.4.5
|
||||
## 05/15/2018
|
||||
|
||||
@@ -150,11 +150,10 @@ class Uri
|
||||
|
||||
$uri = str_replace(static::filterPath($this->root), '', $this->url);
|
||||
|
||||
|
||||
// remove the setup.php based base if set:
|
||||
$setup_base = $grav['pages']->base();
|
||||
if ($setup_base) {
|
||||
$uri = str_replace($setup_base, '', $uri);
|
||||
$uri = preg_replace('|^' . preg_quote($setup_base, '|') . '|', '', $uri);
|
||||
}
|
||||
|
||||
// If configured to, redirect trailing slash URI's with a 302 redirect
|
||||
|
||||
Reference in New Issue
Block a user