From 3ba154db0d769770efb84f42e0675d94f2d3fb85 Mon Sep 17 00:00:00 2001 From: hylom Date: Fri, 7 Jun 2019 17:27:31 +0000 Subject: [PATCH] Controller::Rediect: fix tag page url --- src/newslash_web/lib/Newslash/Web/Controller/Redirect.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/newslash_web/lib/Newslash/Web/Controller/Redirect.pm b/src/newslash_web/lib/Newslash/Web/Controller/Redirect.pm index b1188031..39b635a0 100644 --- a/src/newslash_web/lib/Newslash/Web/Controller/Redirect.pm +++ b/src/newslash_web/lib/Newslash/Web/Controller/Redirect.pm @@ -66,7 +66,7 @@ sub _redirect_by_view { my $tag = $c->model('tags')->select_tagnames(tagname => $filter); if ($tag) { $c->res->code(301); - $c->redirect_to("/tags/$filter"); + $c->redirect_to("/tag/$filter"); return; } } @@ -163,7 +163,7 @@ sub index { my $tag = $c->model('tags')->select_tagnames(tagname => $filter); if ($tag) { $c->res->code(301); - $c->redirect_to("/tags/$filter"); + $c->redirect_to("/tag/$filter"); return; } } @@ -172,12 +172,12 @@ sub index { if ($section) { if ($section eq 'mac') { $c->res->code(301); - $c->redirect_to("/tags/apple"); + $c->redirect_to("/tag/apple"); return; } if (any { $section eq $_ } @sections) { $c->res->code(301); - $c->redirect_to("/tags/$section"); + $c->redirect_to("/tag/$section"); return; } $c->render('Not found', status => '404'); -- 2.11.0