From 68818d27d51a54616a0cea2ef74cb33b2938f545 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 17 Sep 2012 14:27:44 -0400 Subject: [PATCH] Fixed routing configuration: default route with action and trailing slash did not resolve. --- module/VuFind/config/module.config.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php index d3779b48b85..c85fe33d182 100644 --- a/module/VuFind/config/module.config.php +++ b/module/VuFind/config/module.config.php @@ -18,6 +18,19 @@ $config = array( ), ), ), + // TODO: can we address all three default route situations (install, install/, install/home) with + // a single route definition? Currently, we need this case to address trailing slash + missing action. + 'default-without-action' => array( + 'type' => 'Zend\Mvc\Router\Http\Regex', + 'options' => array( + 'regex' => '/(?<controller>[a-zA-Z][a-zA-Z0-9_-]*)(/?)', + 'defaults' => array( + 'controller' => 'index', + 'action' => 'Home', + ), + 'spec' => '/%controller%', + ), + ), 'legacy-alphabrowse-results' => array( 'type' => 'Zend\Mvc\Router\Http\Literal', 'options' => array( -- GitLab