aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--route.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/route.go b/route.go
index abda084..f67904a 100644
--- a/route.go
+++ b/route.go
@@ -33,6 +33,9 @@ func createRoute(route string, template string, content string) {
g.Handle(route+endString, func(c gig.Context) error {
return c.NoContent(gig.StatusRedirectPermanent, route)
})
+ g.Handle(route+"/", func(c gig.Context) error {
+ return c.NoContent(gig.StatusRedirectPermanent, route)
+ })
}
func createErrorRoute(route string, template string, content string, err string) {
@@ -81,4 +84,7 @@ func createBlogRoute(baseRoute string, postPath string) {
g.Handle(baseRoute+endString, func(c gig.Context) error {
return c.NoContent(gig.StatusRedirectPermanent, baseRoute)
})
+ g.Handle(baseRoute+"/", func(c gig.Context) error {
+ return c.NoContent(gig.StatusRedirectPermanent, baseRoute)
+ })
}