From 3c290d0bb5273b7b06d7a56789e1b1fc9fd262c2 Mon Sep 17 00:00:00 2001 From: Meteo Date: Tue, 21 Mar 2017 16:18:36 +0200 Subject: [PATCH] fix redirect --- www/index.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/www/index.php b/www/index.php index ab79a9a..0d8f1a0 100644 --- a/www/index.php +++ b/www/index.php @@ -1816,16 +1816,15 @@ try $router->add ('/koshiki_1c0/koshiki_ovochevi_1c1/kvitkoviy_koshik_1c-4306', - ['controller' => 'page', - 'action' => 'basket_ua',] - ); - + ['controller' => 'page'] + )->beforeMatch(function($matchedRoute, $routeObject) { + return \Phalcon\DI::getDefault()->getResponse()->redirect("/koshiki_1c0/koshiki_ovochevi_1c1", true, 301); + }); $router->add ('/koshiki_1c_20/koshiki_ovochevi_1c_21/tsvetochnaja_korzinka_1c2-4306{language:([/][a-z]{2})?}', - ['controller' => 'page', - 'action' => 'basket_ru',] - ) - ->setName( 'basket_ru' ); + ['controller' => 'page'])->beforeMatch(function($matchedRoute, $routeObject){ + return \Phalcon\DI::getDefault()->getResponse()->redirect("/koshiki_1c_20/koshiki_ovochevi_1c_21/ru", true, 301); + }); -- libgit2 0.21.4