From 4a24e0aa13210a6588e21cc1952bce87656eb093 Mon Sep 17 00:00:00 2001 From: dennispoppe Date: Mon, 31 Aug 2015 11:57:20 +0200 Subject: [PATCH] added RedirectingController.php --- Controller/RedirectingController.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Controller/RedirectingController.php diff --git a/Controller/RedirectingController.php b/Controller/RedirectingController.php new file mode 100644 index 0000000..fbef5f4 --- /dev/null +++ b/Controller/RedirectingController.php @@ -0,0 +1,18 @@ +getPathInfo(); + $requestUri = $request->getRequestUri(); + + $url = str_replace($pathInfo, rtrim($pathInfo, ' /'), $requestUri); + return $this->redirect($url, 301); + } +} \ No newline at end of file