These are chat archives for gin-gonic/gin

21st
Jul 2015
Cosmin Cojocar
@kodevka
Jul 21 2015 15:17
if I have r := gin.New() api := r.Group("/api/v1”) and want to redirect all manual urls like /products for AngularJS html5Mode(true) to index.html again, how should I do it ?

I added

func redirect(c *gin.Context) {
    c.Redirect(301, "/index.html")
}
r.NoRoute(redirect)

and I same 404 result