//重定向外部网址r.GET("/test", func(c *gin.Context) {c.Redirect(http.StatusMovedPermanently, "http://www.google.com/")})//重定向内部网址r.GET("/test1", func(c *gin.Context) {c.Request.URL.Path = "/test2"r.HandleContext(c)})r.GET("/test2", func(c *gin.Context) {c.JSON(200, gin.H{"hello": "world"})})
