Fiber: URL redirection

Created on 15 Oct 2020  路  3Comments  路  Source: gofiber/fiber

URL redirection

Is there a way to redirect from one URL to another ?

馃 Question

All 3 comments

Thanks for opening your first issue here! 馃帀 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@MohamedGouaouri Maybe you're looking for:
https://github.com/gofiber/redirect For Redirect

Something like this?

app.Get("/coffee", func(c *fiber.Ctx) error {
  return c.Redirect("/teapot")
})

app.Get("/teapot", func(c *fiber.Ctx) error {
  return c.Status(fiber.StatusTeapot).Send("馃嵉 short and stout 馃嵉")
})
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ivan-Feofanov picture Ivan-Feofanov  路  3Comments

bashery picture bashery  路  4Comments

mewben picture mewben  路  3Comments

petersephrin picture petersephrin  路  4Comments

mayowa picture mayowa  路  3Comments