diff --git a/admin.php b/admin.php index 8d2497dc..6c1978f5 100644 --- a/admin.php +++ b/admin.php @@ -91,9 +91,9 @@ class AdminPlugin extends Plugin $this->base = '/' . trim($route, '/'); $this->uri = $this->grav['uri']; - // Only activate admin if we're inside the admin path. - if (substr($this->uri->route(), 0, strlen($this->base)) == $this->base) { + if ($this->uri->route() == $this->base || + substr($this->uri->route(), 0, strlen($this->base) + 1) == $this->base . '/') { $this->active = true; } }